npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@payload-pln/panchapakshi-engine

v1.2.0

Published

High-precision, lightweight Panchapakshi calculation engine for TypeScript and JavaScript

Downloads

496

Readme

@payload-pln/panchapakshi-engine

npm version License: MIT TypeScript Node.js CI

A high-precision, lightweight, zero-bloat mathematical calculation engine for the classical Vedic Panchapakshi (Five Birds) biorhythm system rooted in Tamil Agathiyar Shastra.

Designed for TypeScript, Node.js, Next.js, React Native, REST APIs, microservices, and analog clock visualizations.


Table of Contents


What is Panchapakshi?

Panchapakshi Shastra is an esoteric, highly accurate Vedic biorhythm science codified by ancient Tamil Siddhas (notably Sage Agathiyar). It categorizes human biorhythms into five elemental birds (Vulture, Owl, Crow, Cock, Peacock).

Each person is assigned a ruling bird based on their birth star (Nakshatra) and the moon phase (Paksha). Each day is split into Day (sunrise to sunset) and Night (sunset to next sunrise), each divided into 5 equal major periods (Yamams), which are further divided into 5 unequal sub-activities (Apaharas).


Key Features

  • ⚡ Zero Bloat & Blazing Fast: Replaces multi-megabyte static JSON files with deterministic, instantaneous (<1ms) in-memory calculations.
  • ☀️ Real-Time Astronomical Calculations: Computes exact local sunrise and sunset on the fly using high-precision ephemeris algorithms (SunCalc).
  • 🌌 True Vedic Day Boundaries: Correctly handles post-midnight hours (e.g. 02:00 AM) as the night period of the preceding astrological day—never misattributing early morning hours to the new calendar day before sunrise.
  • ⚖️ Classical Proportional Sub-Periods: Uses authentic classical weights for sub-activities (Ruling: 48m, Walking: 36m, Eating: 30m, Sleeping: 18m, Dying: 12m based on a standard 144-minute Yamam) and scales them proportionally to the day's actual solar length.
  • 📐 Analog Clock Dial Angles: Generates ready-to-use radial coordinates (0°–360° for 12-hour face and 60-minute dial) for building SVG/Canvas analog clocks, circular Gantt timelines, and dials.
  • 🤝 Comprehensive Relationship Matrix: Calculates friend/enemy/same dynamics between the native's bird and performing birds to determine auspiciousness.
  • 🛡️ Strictly Typed & Universal: 100% written in TypeScript with full declaration files (.d.ts), supporting both ESM and CommonJS.

Installation

# npm
npm install @payload-pln/panchapakshi-engine

# pnpm
pnpm add @payload-pln/panchapakshi-engine

# yarn
yarn add @payload-pln/panchapakshi-engine

# bun
bun add @payload-pln/panchapakshi-engine

Quick Start

1. Automatic Birth Pakshi Derivation (Date of Birth Example)

Pass a user's birth date, birth time, and geographic coordinates. The engine automatically:

  1. Normalizes local birth time to UTC using coordinates or timezone offset.
  2. Evaluates the lunar phase (Paksha — Sukla vs Krishna).
  3. Computes the Moon's geocentric tropical longitude using the Meeus planetary series.
  4. Applies standard Lahiri Ayanamsa ($23.85^\circ + 1.397^\circ \cdot T$) to derive the Moon's sidereal degree (Nirayana).
  5. Maps the degree to the Janma Nakshatra (Stars 1–27).
  6. Determines and returns the ruling birth bird (Pakshi).
import {
  calculateBirthPakshi,
  getBirdFromBirthData,
} from "@payload-pln/panchapakshi-engine";

// Example: User born on January 6, 1999 at 08:30 AM in Allahabad, India
const birthResult = calculateBirthPakshi({
  birthDate: "1999-01-06",                              // "YYYY-MM-DD" string or Date object
  birthTime: "08:30",                                   // 24-hour time "HH:mm" (defaults to "12:00")
  location: { latitude: 25.4500, longitude: 81.8500 }, // Allahabad, Uttar Pradesh (India)
});

console.log(birthResult.bird);              // "Cock"
console.log(birthResult.nakshatraName);     // "Makha"
console.log(birthResult.nakshatraIndex);    // 10
console.log(birthResult.paksha);            // "Krishnapaksha"
console.log(birthResult.siderealLongitude); // 132.15° (Sidereal Moon longitude in Leo/Simha)
console.log(birthResult.birthTimestamp);    // 1999-01-06T03:00:00.000Z (UTC)

// getBirdFromBirthData is an alias with identical behavior:
const aliasResult = getBirdFromBirthData({
  birthDate: "1999-01-06",
  birthTime: "08:30",
  location: { latitude: 25.4500, longitude: 81.8500 },
});
console.log(aliasResult.bird); // "Cock"

Optional Star Override: If the user already knows their verified birth star from their Kundali (e.g. birthNakshatra: "Purvaphalguni" or birthNakshatra: 11), you can pass it to directly honor that specific star while automatically calculating the lunar phase and bird.


2. Direct Birth Details in calculatePanchapakshi

Instead of calculating the bird in a separate step, pass birth details directly to calculatePanchapakshi. The engine resolves the native bird behind the scenes and calculates the active rhythm windows for their current location:

import { calculatePanchapakshi } from "@payload-pln/panchapakshi-engine";

const state = calculatePanchapakshi({
  // Native's birth details:
  birthDate: "1999-01-06",
  birthTime: "08:30",
  birthLocation: { latitude: 25.4500, longitude: 81.8500 }, // Allahabad (Birth place)

  // Current active location and time:
  location: { latitude: 19.2090, longitude: 73.1860 },      // Ambarnath (Current place)
  date: new Date(),                                         // Current time
});

console.log(state.selectedBird); // "Cock" (automatically derived from birth details!)
console.log(state.currentYamam.mainActivityLabel); // e.g. "Cock-Eat"
console.log(state.currentSubActivity.timeSlotLabel); // e.g. "09:45 AM - 10:15 AM"
console.log(state.powerFactor); // e.g. 0.80
console.log(state.isFavorable); // true

3. Real-Time Active State Calculation

Calculate the active Yamam, current sub-activity, power factor, and favorable status for any bird right now:

import { calculatePanchapakshi } from "@payload-pln/panchapakshi-engine";

// Calculate for a native whose birth bird is "Crow"
const state = calculatePanchapakshi({
  bird: "Crow",
  date: new Date(),
  location: { latitude: 13.0827, longitude: 80.2707 }, // e.g. Chennai, India
});

console.log(state.selectedBird); // "Crow"
console.log(state.paksha); // "Suklapaksha"
console.log(state.astrologicalWeekday); // "Sunday"
console.log(state.isNight); // false (Daytime)
console.log(state.activeYamamIndex); // 0 (1st Yamam)
console.log(state.currentYamam.mainActivityLabel); // e.g. "Crow-Eat"
console.log(state.currentSubActivity.subActivity); // e.g. "Cock-Sleep"
console.log(state.currentSubActivity.timeSlotLabel); // "06:00 AM - 06:18 AM"
console.log(state.currentSubActivity.powerFactor); // 0.64
console.log(state.currentSubActivity.effect); // "Good"
console.log(state.isFavorable); // true

4. Planetary Lordship (Day/Night Ruling & Death Bird)

Every weekday and lunar phase assigns a Day Ruling Bird (King of the Day), a Night Ruling Bird (King of the Night), and a Death Bird (afflicted by Marana). These match the badges displayed on platforms like Drik Panchang (👑 Ruling Pakshi and ☠️ Dying Pakshi):

import {
  calculatePanchapakshi,
  getDailyLordship,
} from "@payload-pln/panchapakshi-engine";

// 1. Included automatically in calculatePanchapakshi:
const state = calculatePanchapakshi({
  bird: "Cock",
  date: new Date("2026-10-03T23:00:00+05:30"), // Saturday night, Krishna Paksha
});

console.log(state.dayRulingBird);     // "Peacock" (👑 Day King)
console.log(state.nightRulingBird);   // "Cock"    (👑 Night King)
console.log(state.deathBird);         // "Cock"    (☠️ Death Bird of Saturday)
console.log(state.activeRulingBird);  // "Cock"    (Ruler active right now at night)
console.log(state.isNativeRuling);    // true      (Is native Cock currently ruling?)
console.log(state.isNativeDeathDay);  // true      (Is today Cock's Death Day?)

// 2. Or direct standalone lookup by Weekday and Paksha:
const lordship = getDailyLordship("Saturday", "Krishnapaksha", "Cock", true);
console.log(lordship.dayRulingBird);    // "Peacock"
console.log(lordship.nightRulingBird);  // "Cock"
console.log(lordship.deathBird);        // "Cock"
console.log(lordship.isNativeRuling);   // true
console.log(lordship.isNativeDeathDay); // true

5. Auto-Resolving Bird from Birth Star (Nakshatra)

If the user does not know their bird, provide their birth Nakshatra and birth Paksha:

import { calculatePanchapakshi, getBirdFromNakshatra } from "@payload-pln/panchapakshi-engine";

// 1. Direct lookup by Nakshatra name (Sanskrit or Tamil alias)
const bird1 = getBirdFromNakshatra("Chitra", "shukla"); // "Crow"
const bird2 = getBirdFromNakshatra("chithirai", "shukla"); // "Crow" (Tamil alias)
const bird3 = getBirdFromNakshatra(14, "krishna"); // "Crow" (By Nakshatra Index 1-27)

// 2. Or pass birth star directly into calculator:
const state = calculatePanchapakshi({
  birthNakshatra: "Chitra",
  birthPaksha: "shukla",
  date: new Date(),
  location: { latitude: 19.0760, longitude: 72.8777 }, // Mumbai, India
});

console.log(state.selectedBird); // "Crow"

6. Full 24-Hour Day Schedule

Generate all 10 Yamams (5 daytime + 5 nighttime) and all 50 sub-periods across the full 24-hour cycle:

import { getPanchapakshiDaySchedule } from "@payload-pln/panchapakshi-engine";

const schedule = getPanchapakshiDaySchedule({
  bird: "Vulture",
  date: new Date(),
  location: { latitude: 13.0827, longitude: 80.2707 },
});

console.log(schedule.dayYamams.length);   // 5
console.log(schedule.nightYamams.length); // 5
console.log(schedule.allYamams.length);   // 10
console.log(schedule.dayRulingBird);     // Day Ruler
console.log(schedule.nightRulingBird);   // Night Ruler
console.log(schedule.deathBird);         // Death Bird
// Each Yamam contains 5 subActivities (50 total sub-periods)

7. Analog Clock Face Angles (12h & 60m Dials)

Every Yamam and Sub-Activity period automatically includes pre-calculated radial angles:

const sub = state.currentSubActivity;

// 12-Hour Clock Face Angles (12:00 = 0°, 3:00 = 90°, 6:00 = 180°, 9:00 = 270°)
console.log(sub.startAngle12h); // e.g. 182.5°
console.log(sub.endAngle12h);   // e.g. 195.0°

// 60-Minute Dial Angles (:00 = 0°, :15 = 90°, :30 = 180°, :45 = 270°)
console.log(sub.startAngle60m); // e.g. 45.0°
console.log(sub.endAngle60m);   // e.g. 120.0°

Standalone angle helper functions are also exported:

import { getAngle12h, getAngle60m, formatTime12h, formatTimeSlot } from "@payload-pln/panchapakshi-engine";

const now = new Date();
const angle12 = getAngle12h(now); // 0 to 360
const angle60 = getAngle60m(now); // 0 to 360
const timeStr = formatTime12h(now); // "02:30 PM"

8. Astronomy & Solar/Lunar Transitions

import { getSunTimes, getPaksha, getAstrologicalPeriod } from "@payload-pln/panchapakshi-engine";

const location = { latitude: 13.0827, longitude: 80.2707 };
const now = new Date();

// 1. Sunrise & Sunset
const { sunrise, sunset } = getSunTimes(now, location);

// 2. Moon Phase (Paksha)
const paksha = getPaksha(now); // "Suklapaksha" | "Krishnapaksha"

// 3. Vedic Astrological Day Period (seamless post-midnight rollover)
const astro = getAstrologicalPeriod(now, location);
console.log(astro.astrologicalWeekday); // e.g. "Sunday" (even at 2:00 AM Monday before sunrise)
console.log(astro.isNight);              // true
console.log(astro.periodStart);          // Previous sunset
console.log(astro.periodEnd);            // Upcoming sunrise

9. Bird Relationships (Friendship & Enmity)

import { getRelationship, BIRD_RELATIONSHIPS } from "@payload-pln/panchapakshi-engine";

// Check relationship between native bird and performing bird
const relation = getRelationship("Vulture", "Owl", "Suklapaksha"); 
console.log(relation); // "Friend" | "Enemy" | "Same"

Planetary Lordship & Special Conditions

In addition to individual Yamam biorhythms, Panchapakshi Shastra establishes global planetary kingship (Adhipatya) for each day of the week and lunar phase.

Lordship Reference Tables (Shukla & Krishna)

Suklapaksha (Waxing Moon)

| Weekday | Day Ruling Bird 👑 | Night Ruling Bird 👑 | Death (Marana) Bird ☠️ | | :--- | :--- | :--- | :--- | | Sunday | Vulture | Crow | Owl | | Monday | Owl | Cock | Crow | | Tuesday | Vulture | Crow | Cock | | Wednesday | Owl | Cock | Peacock | | Thursday | Crow | Peacock | Vulture | | Friday | Cock | Vulture | Owl | | Saturday | Peacock | Owl | Vulture |

Krishnapaksha (Waning Moon)

| Weekday | Day Ruling Bird 👑 | Night Ruling Bird 👑 | Death (Marana) Bird ☠️ | | :--- | :--- | :--- | :--- | | Sunday | Cock | Vulture | Crow | | Monday | Peacock | Cock | Owl | | Tuesday | Cock | Vulture | Vulture | | Wednesday | Crow | Owl | Peacock | | Thursday | Owl | Crow | Cock | | Friday | Vulture | Peacock | Peacock | | Saturday | Peacock | Cock | Cock |


Special Case 1: Simultaneous Ruler & Death Day (2026-10-03)

On Saturday, October 3, 2026 during Krishna Paksha:

  • Night Ruler (Ratri Adhipati): Cock (rulingDays.nightTime = ["Monday", "Saturday"]).
  • Death Day (Pattu Naal): Cock (deathDays = ["Thursday", "Saturday"]).

On Drik Panchang and our engine, this produces an edge-case where Cock is both the Night King (Ruling: Cock) and the Death Bird (Dying: Cock):

  • Throughout the night, Cock holds the cosmic crown.
  • In Yamam 4 (01:23 AM – 03:49 AM), Cock performs Death (Marana).
  • In Yamam 5 (03:49 AM – 06:15 AM), Cock performs Ruling (Rajya).
  • Benchmark fixture: test/fixtures/drik_panchang/2026-10-03_cock.json.

Special Case 2: Amavasya Intra-Night Phase Switch (2026-10-10)

On Saturday, October 10, 2026 (Amavasya / New Moon):

  • Daytime runs in Krishna Paksha (Day Ruler: Peacock, Death: Cock).
  • Sunset occurs at 05:57 PM. Night begins under Krishna Paksha (Night Ruler: Cock, Death: Cock).
  • ⚡ At 09:19 PM IST, the Moon crosses the Sun (0° elongation). Amavasya ends and Shukla Pratipada begins.
  • Drik Panchang and our scraper capture 11 Yamams instead of 10:
    • Yamam 2 (08:25 PM – 10:54 PM) is split right at 09:19 PM.
    • 08:25 PM – 09:19 PM: Krishna Paksha (Ruler: Cock, Death: Cock).
    • 09:19 PM – 10:54 PM: Shukla Paksha (Ruler: Owl, Death: Vulture).
    • From 09:19 PM onward, all remaining Yamams switch to Shukla Paksha Saturday night rules!
  • Benchmark fixture: test/fixtures/drik_panchang/2026-10-10_cock.json.

Drik Panchang Scraper & Benchmark Fixtures

To ensure calculations are always verified against real-world authoritative data, this repository includes an automated scraping and benchmarking suite.

CLI Scraper Tool

You can scrape live Panchapakshi tables directly from Drik Panchang for any bird and date:

# Scrape Saturday Krishna Paksha edge-case (2026-10-03)
npm run scrape -- --bird=Cock --date=2026-10-03

# Scrape Amavasya phase switch edge-case (2026-10-10)
npm run scrape -- --bird=Cock --date=2026-10-10

# Scrape any custom bird and date:
npm run scrape -- --bird=Peacock --date=2026-11-15

Scraped fixtures are saved automatically to test/fixtures/drik_panchang/${YYYY-MM-DD}_${bird}.json.

Ground-Truth Fixture Schema

Each fixture stores:

{
  "bird": "Cock",
  "date": "2026-10-03",
  "dayRulingBird": "Peacock",
  "dayDyingBird": "Cock",
  "nightRulingBird": "Cock",
  "nightDyingBird": "Cock",
  "hasPhaseSwitch": false,
  "yamams": [
    {
      "index": 1,
      "period": "Day",
      "timeSlotLabel": "06:15 AM to 08:37 AM",
      "duration": "02 Hours 22",
      "activity": "Rule",
      "paksha": "Krishna Paksha",
      "rulingBird": "Peacock",
      "dyingBird": "Cock",
      "subActivities": [
        {
          "subActivity": "Cock-Eating",
          "performingBird": "Cock",
          "activity": "Eat",
          "duration": "47 Mins",
          "timeSlotLabel": "06:15 AM to 07:03 AM",
          "relation": "Self",
          "effect": "Good",
          "rating": "++++++"
        }
      ]
    }
  ]
}

Both AI tools and developers can run automated test suites against these fixtures:

npm test

Astrological Foundations

The Five Birds

| Bird | Tamil Name | Element | Ruling Direction | | :--- | :--- | :--- | :--- | | Vulture | Valluru (வல்லூறு) | Ether (Akash) | East | | Owl | Aandhai (ஆந்தை) | Air (Vayu) | South | | Crow | Kaagai (காகம்) | Fire (Agni) | Central | | Cock | Seval (சேவல்) | Water (Jala) | North | | Peacock | Mayil (மயில்) | Earth (Prithvi) | West |

The Five Activities & Power Factors

| Activity | Tamil Term | Baseline Duration | Power Factor | Auspiciousness | | :--- | :--- | :--- | :--- | :--- | | Rule | Arasu (அரசு) | 48 minutes (120 Vighatis) | 1.00 | Highly Favorable | | Eat | Oon (ஊண்) | 36 minutes (90 Vighatis) | 0.80 | Favorable | | Walk | Nadai (நடை) | 30 minutes (75 Vighatis) | 0.64 | Neutral / Moderate | | Sleep | Thuyil (துயில்) | 18 minutes (45 Vighatis) | 0.32 | Inauspicious | | Death | Saavu (சாவு) | 12 minutes (30 Vighatis) | 0.10 | Highly Inauspicious |

Proportional Sub-Period Scaling

A standard classical Yamam is 144 minutes (3.75 Nazhigai / 2.4 hours). Because the actual duration from sunrise to sunset varies by latitude and season, this engine dynamically scales each Yamam and sub-activity:

$$\text{Scaled Duration} = \text{Standard Duration} \times \left( \frac{\text{Actual Period Duration}}{\text{720 minutes}} \right)$$

This ensures mathematically continuous time boundaries without any gaps or rounding drift.


API Reference

calculateBirthPakshi(input: BirthDetailsInput): BirthPakshiResult

(Alias: getBirdFromBirthData)

Calculates the native's Panchapakshi bird directly from their date of birth, time, and geographic location.

Options:

  • birthDate: string | Date — Birth date ("YYYY-MM-DD" e.g. "1999-01-06" or Date object).
  • birthTime?: string — 24-hour birth time ("HH:mm" e.g. "08:30", defaults to "12:00").
  • location?: GeoLocation — Birth place coordinates ({ latitude, longitude }).
  • timezoneOffsetHours?: number — Optional manual offset (defaults to +5.5 for India, or longitude / 15).
  • birthNakshatra?: string | number — Optional verified Janma Nakshatra override from birth chart.

Returns BirthPakshiResult:

  • bird: Bird — The resolved native bird ("Cock" | "Crow" | "Owl" | "Peacock" | "Vulture").
  • nakshatraIndex: number — Janma Nakshatra number (1 to 27).
  • nakshatraName: string — Canonical Nakshatra name (e.g. "Makha", "Purvaphalguni").
  • paksha: Paksha — Moon phase at birth ("Suklapaksha" | "Krishnapaksha").
  • birthTimestamp: Date — Normalized birth timestamp in UTC.
  • siderealLongitude: number — Sidereal longitude of the Moon in degrees (0° to 360°, Lahiri Ayanamsa).
  • tropicalLongitude: number — Geocentric tropical longitude in degrees.
  • ayanamsa: number — Lahiri Ayanamsa applied in degrees.

calculatePanchapakshi(input: PanchapakshiInput): PanchapakshiResult

Calculates the active state for a given moment and location.

Options:

  • bird?: Bird — Native bird ("Vulture" | "Owl" | "Crow" | "Cock" | "Peacock").
  • birthDate?: string | Date — Birth date ("YYYY-MM-DD" or Date). If provided without bird, bird is derived automatically via astronomical calculation.
  • birthTime?: string — Birth time ("HH:mm" e.g. "08:30").
  • birthLocation?: GeoLocation — Birth place coordinates for timezone/planetary derivation.
  • birthNakshatra?: string | number — Native's birth star (1–27 or name like "Makha", "Aswini").
  • birthPaksha?: Paksha | "shukla" | "krishna" — Moon phase at birth.
  • date?: Date — Date & time to calculate for (defaults to new Date()).
  • location?: GeoLocation — Latitude and longitude for current active solar timings (defaults to Chennai: { latitude: 13.0827, longitude: 80.2707 }).
  • sunTimes?: SunTimes — Optional override for sunrise/sunset if using custom ephemeris.

Returns PanchapakshiResult:

  • selectedBird: Bird — The active bird.
  • targetDate: Date — Calculation timestamp.
  • paksha: Paksha — Current lunar paksha.
  • astrologicalWeekday: Weekday — Astrological day of the week.
  • isNight: boolean — Daytime vs Nighttime.
  • sunrise: Date / sunset: Date — Solar boundaries.
  • yamams: YamamPeriod[] — The 5 Yamams of the active half-day.
  • currentYamam: YamamPeriod — The currently running Yamam.
  • currentSubActivity: SubActivityPeriod — The currently running sub-activity.
  • activeYamamIndex: number — Index (0–4) of active Yamam.
  • activeSubActivityIndex: number — Index (0–4) of active sub-activity.
  • powerFactor: number — Scaled net power (0.0 to 1.0).
  • isFavorable: boolean — Whether current period is favorable.
  • dayRulingBird: Bird — Day King bird.
  • nightRulingBird: Bird — Night King bird.
  • deathBird: Bird — Death bird for this astrological day.
  • activeRulingBird: Bird — Active ruler (dayRulingBird if daytime, nightRulingBird if nighttime).
  • isNativeRuling: boolean — True if native bird is currently ruling.
  • isNativeDeathDay: boolean — True if today is native bird's death day.
  • lordship: DailyLordship — Complete planetary lordship object.

getDailyLordship(weekday: Weekday, paksha: Paksha, nativeBird?: Bird, isNight?: boolean): DailyLordship

Retrieves the day and night ruling birds, death bird, and native bird lordship status for any weekday and paksha.

Options:

  • weekday: Weekday — Day of week ("Sunday" to "Saturday").
  • paksha: Paksha — Lunar phase ("Suklapaksha" or "Krishnapaksha").
  • nativeBird?: Bird — Optional native bird to evaluate isNativeRuling and isNativeDeathDay for.
  • isNight?: boolean — Whether looking up for nighttime (defaults to false).

Returns DailyLordship:

  • dayRulingBird: Bird — Day King bird.
  • nightRulingBird: Bird — Night King bird.
  • deathBird: Bird — Death bird.
  • activeRulingBird: Bird — Active ruler for the period.
  • isNativeRuling: boolean — True if nativeBird equals activeRulingBird.
  • isNativeDeathDay: boolean — True if nativeBird equals deathBird.

getPanchapakshiDaySchedule(input: PanchapakshiInput): FullDaySchedule

Generates all 10 Yamams (5 Day + 5 Night) and all 50 sub-activities across the complete 24-hour astrological cycle.

Returns FullDaySchedule:

  • bird: Bird — The native bird.
  • astrologicalWeekday: string — Astrological weekday.
  • paksha: string — Active paksha.
  • sunrise: Date / sunset: Date — Astrological day solar boundaries.
  • dayRulingBird: Bird — Day King bird.
  • nightRulingBird: Bird — Night King bird.
  • deathBird: Bird — Death bird.
  • lordship: DailyLordship — Full daily lordship info.
  • dayYamams: YamamPeriod[] — The 5 daytime Yamams.
  • nightYamams: YamamPeriod[] — The 5 nighttime Yamams.
  • allYamams: YamamPeriod[] — All 10 Yamams combined.

Development & Testing

# Install dependencies
npm install

# Run Vitest test suite
npm test

# Build TypeScript to dist
npm run build

License

MIT © PLN