DEV Community

DevDarsha API
DevDarsha API

Posted on

How to Find a Blue Moon Using Panchang JSON

How to Find a Blue Moon Using Panchang JSON

A Blue Moon is often misunderstood.

It does not usually mean that the Moon turns blue in color. In common modern calendar usage, a Blue Moon means the second Full Moon in the same Gregorian calendar month.

This is a useful example where modern calendar logic and Indian Panchang data can be compared.

In the Panchang system, the Full Moon is represented by Purnima Tithi. So if we can detect two Purnima dates inside one Gregorian month, we can identify the second one as the Blue Moon reference.

For this example, we will use Kolkata, India and the month of May 2026.

Live reference:

https://platform.devdarsha.com/playground
Enter fullscreen mode Exit fullscreen mode

What We Are Checking

The rule is simple:

If one Gregorian month has two Full Moon / Purnima dates,
the second one is called a Blue Moon.
Enter fullscreen mode Exit fullscreen mode

So for May 2026, we need to check whether there are two Purnima dates.

## First Purnima: 1 May 2026

From DevDarsha Panchang JSON for Kolkata:

{
  "date": "2026-05-01",
  "weekday": "Friday",
  "timezone": "Asia/Kolkata",
  "city": "Kolkata",
  "tags": [
    "shukla_paksha",
    "purnima"
  ],
  "tithi": [
    {
      "number": 15,
      "name": "Purnima",
      "paksha": "Shukla",
      "start": "01-05-2026 05:04:20",
      "end": "01-05-2026 22:54:20"
    }
  ]
}
Enter fullscreen mode Exit fullscreen mode

This confirms that 1 May 2026 is a Purnima date for Kolkata.

## Second Purnima: 31 May 2026

Now check another date in the same Gregorian month:

{
  "date": "2026-05-31",
  "weekday": "Sunday",
  "timezone": "Asia/Kolkata",
  "city": "Kolkata",
  "tags": [
    "shukla_paksha",
    "purnima"
  ],
  "tithi": [
    {
      "number": 15,
      "name": "Purnima",
      "paksha": "Shukla",
      "start": "31-05-2026 04:51:47",
      "end": "31-05-2026 14:16:09"
    },
    {
      "number": 16,
      "name": "Pratipada",
      "paksha": "Krishna",
      "start": "31-05-2026 14:16:09",
      "end": "01-06-2026 16:38:39"
    }
  ]
}
Enter fullscreen mode Exit fullscreen mode

This confirms that 31 May 2026 is also a Purnima date for Kolkata.

Result

May 2026 has two Purnima dates for Kolkata:

Date Panchang Result Calendar Meaning
1 May 2026 Purnima First Full Moon of May 2026
31 May 2026 Purnima Second Full Moon of May 2026

Therefore:

31 May 2026 = Blue Moon reference for Kolkata
Enter fullscreen mode Exit fullscreen mode

How a User Can Find a Blue Moon

A user can follow this method:

  1. Select a city.
  2. Check each date in a Gregorian month.
  3. Look for Panchang JSON where tithi.name is Purnima.
  4. Count how many Purnima dates occur in that same month.
  5. If there are two, the second Purnima is the Blue Moon.

In JSON terms, look for either:

"tags": ["shukla_paksha", "purnima"]
Enter fullscreen mode Exit fullscreen mode

or:

"tithi": [
  {
    "name": "Purnima",
    "paksha": "Shukla"
  }
]
Enter fullscreen mode Exit fullscreen mode

## Simple JavaScript Logic

Here is a basic example of how this can be detected programmatically:

const monthData = [
  {
    date: "2026-05-01",
    city: "Kolkata",
    tags: ["shukla_paksha", "purnima"],
    tithi: [{ name: "Purnima", paksha: "Shukla" }]
  },
  {
    date: "2026-05-31",
    city: "Kolkata",
    tags: ["shukla_paksha", "purnima"],
    tithi: [
      { name: "Purnima", paksha: "Shukla" },
      { name: "Pratipada", paksha: "Krishna" }
    ]
  }
];

const purnimaDates = monthData.filter(day =>
  day.tags.includes("purnima") ||
  day.tithi.some(t => t.name === "Purnima")
);

if (purnimaDates.length >= 2) {
  const blueMoonDate = purnimaDates[1].date;
  console.log(`Blue Moon reference date: ${blueMoonDate}`);
}
Enter fullscreen mode Exit fullscreen mode

Output:

Blue Moon reference date: 2026-05-31
Enter fullscreen mode Exit fullscreen mode

Panchang vs Blue Moon

The important point is that Blue Moon is not originally a Panchang term.

It is based on the Gregorian calendar.

Concept Panchang System Blue Moon Concept
Basis Tithi Gregorian calendar month
Full Moon term Purnima Full Moon
Cycle Lunar Calendar-month comparison
Detection Shukla Paksha Purnima Second Full Moon in same month
Example 1 May and 31 May 2026 are Purnima 31 May 2026 is the Blue Moon

So the Panchang helps identify the Full Moon dates, while the Gregorian calendar decides whether the second one is called a Blue Moon.

Why City and Timezone Matter

Lunar events should be checked city-wise because Panchang calculations depend on location and timezone.

For this example, the data is for:

City: Kolkata
Timezone: Asia/Kolkata
Enter fullscreen mode Exit fullscreen mode

A different city or timezone may shift the local calendar date for certain lunar events, especially when the Tithi starts or ends near sunrise or midnight.

Live JSON Reference

You can verify this using DevDarsha Playground:

https://platform.devdarsha.com/playground
Enter fullscreen mode Exit fullscreen mode

Use these two dates for Kolkata:

2026-05-01
2026-05-31
Enter fullscreen mode Exit fullscreen mode

Both dates return Purnima in the Panchang data.

References

DevDarsha Playground
https://platform.devdarsha.com/playground

NASA Moon Phases
https://science.nasa.gov/moon/moon-phases/

Timeanddate Blue Moon Explanation
https://www.timeanddate.com/astronomy/moon/blue-moon.html

Timeanddate Kolkata Moon Phases
https://www.timeanddate.com/moon/phases/india/kolkata

Top comments (0)