Skip to content
Documentation · all sections

Daily Panchang

panchang-ts · v5.0.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) computes everything the almanac says about one Hindu day at one place; getInstantPanchang(instant, location, options?) answers the subset that is meaningful at a single moment. This page walks the daily result group by group. The shape rules — real instants + *Local strings and always-present fields — are covered in Getting Started; 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 transition mid-day: tithis[0] is 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 etc. — the instant shapes 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)

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 — the Moon can skip a day
r.sun.dayDurationMinutes;                // = r.sun.dinamanaMinutes (alias)
r.sun.nightDurationMinutes;              // = r.sun.ratrimanaMinutes (alias)
r.sun.siderealLongitude;                 // at sunrise
r.moon.siderealLongitude;                // at sunrise

The standalone primitives getSunrise / getSunset / getMoonrise / getMoonset return the same cached, single-valued events — see the export list. Moonrise and moonset use the Meeus apparent-upper-limb model (refraction + parallax).

Auspicious muhurtas

r.muhurtas.brahma;          // two muhurtas before sunrise
r.muhurtas.abhijit;         // 8th day-muhurta; null on Wednesday (Drik 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;       // nakshatra-specific window (null when nakshatra has none)

Each is a TimePeriod ({ start, end } + the *Local pair) or null where the tradition defines none that day. pratahSandhya / sayahnaSandhya width is sun.nightDurationMinutes / 10 (~62–81 min).

Inauspicious periods

r.inauspicious.rahuKalam;       // { start, end }
r.inauspicious.gulikaKalam;
r.inauspicious.yamaganda;
r.inauspicious.durMuhurta;      // two ~48-min windows
r.inauspicious.varjyam;         // { start, end } | null
r.inauspicious.gandaMula;       // { active, severity: 'mild'|'severe'|null, … }
r.inauspicious.bhadra;          // { start, end, location: 'earth'|'heaven'|'paatal', isActive } | null
r.inauspicious.panchaka;        // boolean — Moon in last 5 nakshatras
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));

Panchaka is classified by its onset weekday

Panchaka is not one undifferentiated affliction. The tradition names five and picks between them by the weekday the spell began on — so the type belongs to the spell, not the day, and two days with identical tithi, nakshatra and vara can carry different ones. A spell begun on a Wednesday or Thursday ('samanya') carries no named affliction at all:

const pk = r.inauspicious.panchakaInfo;
if (pk.active && pk.isDosha) {
  console.log(pk.name, '— began on vara', pk.onsetVara);  // e.g. "Mrityu Panchaka"
}

bhadra.location is the machine-readable key ('earth' is the malefic one); bhadra.locationName is the localized display name.

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. "Ananda"
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);
});

Personal transits on the daily result

Pass natal indices and the daily result carries the day's personal transits; omit them 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 (Sade Sati) and the standalone helpers live in Dashas & Transits.

Festivals and eclipse on the daily result

r.festivals is the day's festival list ([] when none) and r.eclipse the eclipse overlapping the Hindu day (null when none). Both have dedicated pages: Festivals, Eclipses & Moon Phases.