Skip to content
Documentation · all sections

Daily Panchang

panchang · v5.4.0 · MIT

getDailyPanchang and getInstantPanchang in full: every option, and all seven result groups — angas, calendar, sun, moon, muhurtas, inauspicious periods, and time-slot systems.

getDailyPanchang(date, location, options) gives you everything the almanac says about one Hindu day at one place. getInstantPanchang(instant, location, options?) gives you the part that makes sense at a single moment. This page walks the daily result group by group.

Getting Started covers how to read the times and which fields are always present. Every option is listed in Options & Localization.

Pancha Anga — the five limbs

angas holds the five limbs. The plural fields are arrays because an element can change part-way through the day. tithis[0] is the one active at sunrise, and each entry carries its own window.

const r = getDailyPanchang(date, location, { timezone: 330 })!;

r.angas.tithis.forEach(t => console.log(t.name, t.paksha, t.completionPercentage, t.endTime));
r.angas.nakshatras.forEach(n => console.log(n.name, n.pada, n.endTime));
r.angas.yogas.forEach(y => console.log(y.name, y.endTime));
r.angas.karanas.forEach(k => console.log(k.name, k.type, k.endTime));
console.log(r.angas.vara.name, r.angas.vara.englishName);   // "Mangalawara", "Tuesday"

// Single-instant snapshot — singular fields, no windows:
import { getInstantPanchang } from 'panchang-ts';
const i = getInstantPanchang(new Date(), location)!;
console.log(i.angas.tithi.name, i.angas.nakshatra.name, i.angas.vara.name);

Daily entries are DailyTithiInfo and its siblings: the instant shape plus startTime and isActiveAtSunrise. Field reference: Types & Exports.

Lunar & solar calendar

const r = getDailyPanchang(date, loc, { timezone: 330, masaSystem: 'purnimanta' })!;

r.calendar.chandramasa.name;           // active system (default: Purnimanta / North Indian)
r.calendar.chandramasa.amantaName;     // South Indian
r.calendar.chandramasa.purnimantaName; // North Indian
r.calendar.chandramasa.isAdhika;       // true during leap months
r.calendar.samvat.vikramSamvat;        // 2081
r.calendar.samvat.shakaSamvat;         // 1946

r.calendar.masa.name;                  // current SOLAR month (Mesha … Meena)
r.sun.nakshatra.name;                  // the Sun's nakshatra
r.moon.rashi.name;                     // Moon sign (Chandra Rashi)

In Go the masa system is a named string type with types.Purnimanta and types.Amanta to pick from, and a plain string still assigns, so a misspelling is accepted: the call succeeds, you get a purnimanta result, and your typo is echoed back in Calendar.Chandramasa.System. TypeScript rejects the same typo at compile time.

Sun & Moon

const r = getDailyPanchang(date, loc, { timezone: 330 })!;

r.sun.rise; r.sun.set; r.sun.nextRise;   // Date + riseLocal/setLocal/nextRiseLocal
r.moon.rise; r.moon.set;                 // Date | null: set is the first moonset after rise
r.sun.dayDurationMinutes;                // = r.sun.dinamanaMinutes (alias)
r.sun.nightDurationMinutes;              // = r.sun.ratrimanaMinutes (alias)
r.sun.siderealLongitude;                 // at sunrise
r.moon.siderealLongitude;                // at sunrise

moon.set is the first moonset after moon.rise, so it often falls on the next civil day, as it does above. On a day the Moon does not rise, it is that civil day's own first moonset, or null; since 5.4 that set is never borrowed from the next civil day. At Reykjavik on 21 December 2025 both are null, where 5.3 reported a set at 17:26 on the 22nd.

getSunrise, getSunset, getMoonrise and getMoonset return the same events on their own — see the export list. Moonrise and moonset use the Meeus apparent-upper-limb model, with refraction and parallax.

Auspicious muhurtas

r.muhurtas.brahma;          // 14th of 15 night muhurtas, ends one night muhurta before sunrise
r.muhurtas.abhijit;         // 8th day-muhurta; null on Wednesday (reference-almanac convention)
r.muhurtas.vijaya;          // 11th day-muhurta
r.muhurtas.godhuli;         // "cow-dust" sunset muhurta
r.muhurtas.nishita;         // midnight muhurta (Shivaratri)
r.muhurtas.madhyahna;       // solar noon ±24 min
r.muhurtas.pratahSandhya;   // dawn twilight, ends at sunrise
r.muhurtas.sayahnaSandhya;  // dusk twilight, starts at sunset
r.muhurtas.amritKala;       // TimePeriod[] — 0-2 nakshatra-anchored windows (5.1+)

Each one is a TimePeriod ({ start, end } plus the *Local pair), or null on a day the tradition defines none. amritKala is the exception: it is a TimePeriod[]. pratahSandhya and sayahnaSandhya are each sun.nightDurationMinutes / 10 wide. At Ujjain that runs from about 63 minutes in June to 80 in December, and the range widens farther from the equator.

Brahma Muhurta is a night muhurta

Since 5.4 brahma is the 14th of the 15 night muhurtas before the day's sunrise. The window is one night muhurta wide and ends one night muhurta before sunrise, so with a 12-hour night it runs from 96 to 48 minutes before sunrise. The daily result takes the night muhurta as sun.nightDurationMinutes / 15, the day's own night from its sunset to the next sunrise. Pratah Sandhya is sized by the same night, so the window's midpoint falls exactly on pratahSandhya.start.

At Ujjain on 14 January 2025 the night is 789 minutes, and the window is 05:25:07 to 06:17:42 IST: 52.6 minutes wide, from 105 to 53 minutes before the 07:10:16 sunrise. Its midpoint, 05:51:25.054, is Pratah Sandhya's start to the millisecond. On 20 March 2025, the equinox, the night there is 712 minutes and the window is 04:56:00 to 05:43:28, 94.9 to 47.5 minutes before sunrise.

Before 5.4 it was a window of daylight/30 that ended daylight/30 before sunrise: 06:26:50 to 06:48:33 on the same January day. A Brahma Muhurta you stored from 5.3 has moved; see Upgrading 5.3 → 5.4. The standalone computeBrahmaMuhurta(sunrise, sunset) returns the same 14th night muhurta, but with only those two instants it takes the night as 24 hours less the daylight, so its window can differ from muhurtas.brahma by a few seconds.

Amrit Kala is a list

Since 5.1 amritKala is a TimePeriod[]; it used to be TimePeriod | null. It is built the same way as Varjyam. Each window is measured from the start of its own nakshatra, offset by a count of ghatikas that varies per nakshatra, and spans exactly four such ghatikas. A window belongs to the Hindu day its start falls in, and a day carries 0 to 2 windows.

The old sunrise-anchored single window disagreed with the reference almanac by up to about 16 hours. computeAmritKala is replaced by computeAmritKalaWindows.

Inauspicious periods

r.inauspicious.rahuKalam;       // { start, end }
r.inauspicious.gulikaKalam;
r.inauspicious.yamaganda;
r.inauspicious.durMuhurta;      // DurMuhurtaPeriod[] — 1-2 windows, .segment 'day'|'night' (5.1+)
r.inauspicious.varjyam;         // TimePeriod[] — every window of the day (5.1+)
r.inauspicious.gandaMula;       // { active: false } | { active: true, nakshatraName, severity: 'mild'|'severe' }
r.inauspicious.bhadra;          // { start, end, location: 'earth'|'heaven'|'paatal', isActive } | null
r.inauspicious.panchaka;        // boolean — Moon from Dhanishtha 3rd pada through Revati
r.inauspicious.panchakaInfo;    // which of the five, and whether it's a dosha

// Panchaka Rahita — slices of the day FREE of Panchaka ([] when it pervades)
r.inauspicious.panchakaRahita.forEach(slice => console.log(slice.start, slice.end));

bhadra.location is the machine-readable key, and 'earth' is the malefic one. bhadra.locationName is the localized display name.

The Bhadra window starts and ends on the Vishti karana boundary. On a handful of days 5.3 reported the end about a minute late (63 seconds in every case measured): at Urumqi on 6 January 2024 it now ends at 01:12:14 on the 7th, where 5.3 said 01:13:17.

The standalone window helpers take the weekday as an index, 0 = Sunday. Since 5.4 computeRahuKalam, computeGulikaKalam, computeYamaganda and computeGowriPanchangam throw a PanchangError with code INVALID_INPUT for a vara that is not a whole number from 0 to 6. Before, the first three returned a window of Invalid Dates and Gowri crashed with a TypeError. The Go functions have no error return, so panchang.ComputeRahuKalam and its siblings panic with a message that names the function.

Varjyam lists every window of the Hindu day

Since 5.1 varjyam is a TimePeriod[] in start order. Most days carry one window, some carry two, and [] means the day has none: at Ujjain in 2025, 308 days had one, 33 had two and 24 had none. A window belongs to the Hindu day its start falls in, so one that begins before sunrise and runs past it is yesterday's. The instants are unclamped, so an end can land after the next sunrise.

Mula is the one nakshatra that carries two tyajya spells, at elapsed ghatikas 20 and 56, so a day inside a Mula spell can list both. Varjyam was checked window for window against a 61-day reference-almanac sweep — see Accuracy.

The standalone computeVarjyam(currentNakshatraIndex, sunrise, nextSunrise, getMoon) returns null (in Go, ok is false) unless the index is the nakshatra in force at sunrise. Before 5.4 any other index gave a window that meant nothing: at Pune on 20 March 2025, with Anuradha (16) at sunrise, index 21 gave a window seven seconds long. For every window of the day, later nakshatras included, call computeVarjyamWindows, which is what varjyam is built from.

Panchaka is classified by its onset weekday

The tradition names five kinds of Panchaka and picks between them by the weekday the spell began on. The type belongs to the spell, not to the day, so two days with the same tithi, nakshatra and vara can carry different ones. A spell that began on a Wednesday or Thursday is 'samanya' and carries no named affliction.

// 2025-01-04 — a Panchaka spell that began on a Friday.
const pk = r.inauspicious.panchakaInfo;
if (pk.active && pk.isDosha) {
  console.log(pk.name, '— began on vara', pk.onsetVara);  // "Chora Panchaka — began on vara 5"
}

Time-slot systems

// Choghadiya — 8 day + 8 night named, rated slots (Amrit, Kaal, Shubh, Rog, …)
r.periods.choghadiya.day.forEach(s => console.log(s.name, s.qualityName, s.start, s.end));

// Gowri Panchangam ("Nalla Neram") — 8 day + 8 night Tamil slots
r.periods.gowri.day.forEach(s => console.log(s.name, s.qualityName));

// Hora — 12 day + 12 night planetary hours (Chaldean order)
r.periods.hora.day.forEach(h => console.log(h.planet, h.start, h.end));

// Do Ghati Muhurta — 15 day + 15 night ~48-min deity-keyed slots (no vara rotation)
r.muhurtas.doGhati.day.forEach(g => console.log(g.name, g.start, g.end));

Special yogas

r.anandadiYoga.name;   // 28-cycle name e.g. "Sthira"
r.specialYogas.forEach(y => {
  // type: amrit_siddhi | sarvartha_siddhi | ravi_pushya | guru_pushya
  //     | dwipushkar | tripushkar | jwalamukhi (inauspicious)
  //     | aadal | vidaal | ravi (Moon-from-Sun nakshatra-distance rules)
  console.log(y.name, y.type);   // "Aadal Yoga" "aadal"
});

specialYogas covers every tithi and nakshatra of the day, and since 5.4 it does so under computeEndTimes: false too. Before, that option cut it down to the sunrise angas: at Pune on 2 January 2025 the default call listed ravi and the false call listed nothing.

Personal transits on the daily result

Pass the natal indices and the result carries that day's personal transits. Leave them out and the fields are null.

const r = getDailyPanchang(date, loc, {
  timezone: 330,
  janmaRashi: 3,        // 0 = Mesha … 11 = Meena
  janmaNakshatra: 0,    // 0 = Ashwini … 26 = Revati
})!;
r.chandraBalam;  // { house, quality: 'strong'|'weak', name, englishName } — null without janmaRashi
r.tarabala;      // { taraIndex, name, englishName, quality } — null without janmaNakshatra

Longer-horizon transits such as Sade Sati, and the standalone helpers, are in Dashas & Transits.

Festivals and eclipse on the daily result

r.festivals is the day's festival list, [] when there are none. r.eclipse is the eclipse that belongs to the Hindu day, null when there is none. Both have their own pages: Festivals and Eclipses & Moon Phases.

Since 5.4 each eclipse belongs to exactly one Hindu day. A lunar eclipse belongs to the day that holds its peak. A solar eclipse belongs to the day it is first seen from the location: at its peak if the Sun is up then, else at first contact if the Sun is up then, else at last contact. Before, an eclipse whose peak and syzygy fell on either side of a sunrise could show on two consecutive days: at New York the partial solar eclipse of 29 March 2025 peaked before that morning's sunrise and reached new moon after it, and 5.3 listed it on the 28th as well. The surya_grahan or chandra_grahan entry in festivals follows the same day.

A solar eclipse whose peak comes with the Sun below the horizon is now described by the deepest phase actually seen, at sunrise or sunset. obscuration and magnitude stay the values at the peak, and visibleFromLocation still says whether the Sun is up at the peak, so the text and the fields can disagree. That New York eclipse reads “Partial solar eclipse: 24% obscuration, visible from location.” with an obscuration of 0.775 and visibleFromLocation false.

5.2.0 repunctuated several festival name strings and the eclipse description template. festivals[].key did not move, so match on it.

5.4.0 changes the day many festivals fall on and adds two keys. holika_dahan is the Holika Dahan evening, and holi is now the day after it, Rangwali Holi: at Delhi the 2026 daily results list holika_dahan on 3 March and holi on 4 March. karthigai_deepam takes the place of masik_karthigai on its day for the regions 'all' and 'tamil-nadu'. getInstantPanchang reports by the tithi at the instant and skips these day rules, so an instant in Phalguna Purnima lists holika_dahan, holi and phagli together, and it never lists karthigai_deepam. See Upgrading 5.3 → 5.4 for every rule that moved.