
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
@ishubhamx/panchangam-js
Advanced tools
Enhanced Indian Panchangam (Hindu Calendar) library with comprehensive Vedic features including Muhurta calculations, planetary positions, Rashi placements, and auspicious/inauspicious time calculations
The most comprehensive Hindu Panchang / Panchangam library for JavaScript & TypeScript. Calculate Tithi, Nakshatra, Yoga, Karana, Muhurta, Kundli, Dasha, planetary positions, and 80+ Hindu festivals — all offline, with Swiss Ephemeris precision.
Whether you're building a Hindu calendar app, Vedic astrology software, Jyotish tool, daily Panchang website, or a horoscope matching application — this library has everything you need.
🌐 Live Demo: hindu-panchang-c1a81.web.app 🤖 Google Play (Closed Testing): Download on Play Store
| What you get | Details |
|---|---|
| Full Panchang | Tithi, Nakshatra, Yoga, Karana, Vara with precise transition times |
| Muhurta & Timings | Choghadiya, Rahu Kalam, Abhijit Muhurta, Brahma Muhurta, and more |
| Kundli / Birth Chart | Ascendant, Bhava houses, Varga charts (D1 – D12) |
| Kundli Matching | Ashtakoota (Gun Milan) with all 8 Kootas & Dosha analysis |
| Vimshottari Dasha | Full 120-year Mahadasha & Antardasha cycle |
| Planetary Positions | Sun, Moon, Mars, Mercury, Jupiter, Venus, Saturn, Rahu, Ketu with Rashi placement |
| 80+ Festivals | Diwali, Holi, Navratri, Ekadashi, Sankranti, and 75+ more — auto-detected |
| Offline & Fast | No API calls. ~5–10 ms per calculation. Works in Node.js & browsers |
| 98.64% Accuracy | Validated against 643,797 Drik Panchang test cases |
The core library powers a premium mobile application experience with advanced astrological tools.
| Daily Panchang | Solar & Muhurtas | Monthly Calendar | Festivals List |
|---|---|---|---|
![]() | ![]() | ![]() | ![]() |
| Muhurat Finder | Birth Chart | Planetary Status | Saved Profiles |
![]() | ![]() | ![]() | ![]() |
require() and importnpm install @ishubhamx/panchangam-js
yarn add @ishubhamx/panchangam-js
pnpm add @ishubhamx/panchangam-js
import { getPanchangam, Observer, tithiNames, nakshatraNames } from '@ishubhamx/panchangam-js';
const observer = new Observer(28.6139, 77.2090, 216); // Delhi
const panchang = getPanchangam(new Date(), observer, {
timezoneOffset: 330 // IST = UTC+5:30 = 330 minutes
});
console.log(`Tithi: ${tithiNames[panchang.tithi]}`);
console.log(`Nakshatra: ${nakshatraNames[panchang.nakshatra]}`);
console.log(`Sunrise: ${panchang.sunrise?.toLocaleTimeString()}`);
console.log(`Paksha: ${panchang.paksha}`);
console.log(`Masa: ${panchang.masa.name}`);
console.log(`Ritu: ${panchang.ritu}`);
const { getPanchangam, Observer } = require('@ishubhamx/panchangam-js');
const observer = new Observer(19.0760, 72.8777, 10); // Mumbai
const panchang = getPanchangam(new Date(), observer, { timezoneOffset: 330 });
console.log(panchang.tithi);
getPanchangam(date, observer, options?)Calculate complete Panchang for a given date and location.
| Parameter | Type | Description |
|---|---|---|
date | Date | JavaScript Date object |
observer | Observer | Location (latitude, longitude, elevation) |
options.timezoneOffset | number | Offset from UTC in minutes (e.g., 330 for IST) |
Returns: Panchangam object with all calculated data.
Observer(latitude, longitude, elevation)Create an observer for a geographic location (from astronomy-engine).
| Parameter | Type | Range |
|---|---|---|
latitude | number | −90 to 90 (decimal degrees) |
longitude | number | −180 to 180 (decimal degrees) |
elevation | number | Meters above sea level |
const p = getPanchangam(new Date(), observer);
// Choghadiya — 8 day + 8 night intervals
p.choghadiya.day.forEach(interval => {
console.log(`${interval.name}: ${interval.startTime.toLocaleTimeString()} - ${interval.endTime.toLocaleTimeString()} (${interval.rating})`);
});
// Gowri Panchangam — 8 day + 8 night intervals
p.gowri.day.forEach(interval => {
console.log(`${interval.name} (${interval.rating}): ${interval.startTime.toLocaleTimeString()}`);
});
Rahu Kalam (also known as Rahu Kaal) and other inauspicious periods are included in the Panchangam result:
const p = getPanchangam(new Date(), observer, { timezoneOffset: 330 });
console.log(`Rahu Kalam: ${p.rahuKalam.start} - ${p.rahuKalam.end}`);
console.log(`Yamaganda: ${p.yamaganda.start} - ${p.yamaganda.end}`);
console.log(`Gulika: ${p.gulika.start} - ${p.gulika.end}`);
import { getDishaShoola, getTarabalam, getChandrashtama } from '@ishubhamx/panchangam-js';
// Disha Shoola — directional inauspiciousness
const shoola = getDishaShoola(0); // 0 = Sunday
console.log(shoola.direction, shoola.description);
// Tarabalam — Nakshatra-based auspiciousness
const tara = getTarabalam(0, 5); // birthNakshatra, currentNakshatra
console.log(tara.taraName, tara.isAuspicious);
// Chandrashtama — Moon in 8th from birth Rashi
const chandra = getChandrashtama(0, 7); // birthRashi, moonRashi
console.log(chandra.isChandrashtama);
Generate a Vedic birth chart (Kundli) with house placements and Varga charts:
import { calculateKundli, Observer } from '@ishubhamx/panchangam-js';
const kundli = calculateKundli(new Date('1990-05-15T10:30:00'), observer);
console.log('Ascendant:', kundli.ascendant);
console.log('Houses:', kundli.houses);
console.log('Vargas:', kundli.vargas); // D1, D2, D3, D4, D7, D9, D10, D12
Match two horoscopes using the traditional Ashtakoota system:
import { calculateMatch } from '@ishubhamx/panchangam-js';
const result = calculateMatch(
{ nakshatra: 0, rashi: 0 }, // Person 1 (Bride/Groom)
{ nakshatra: 13, rashi: 6 } // Person 2 (Bride/Groom)
);
console.log(`Total Score: ${result.totalScore}/36`);
console.log('Kootas:', result.kootas);
console.log('Doshas:', result.doshas);
Detect 80+ festivals for any date — Diwali, Holi, Ekadashi, Navratri, and more:
import { getFestivals, Observer } from '@ishubhamx/panchangam-js';
const festivals = getFestivals({
date: new Date('2026-01-23'),
observer,
timezoneOffset: 330
});
festivals.forEach(f => console.log(`${f.name} (${f.category})`));
Calculate the full 120-year Mahadasha and Antardasha cycle:
const p = getPanchangam(new Date('1990-05-15'), observer, { timezoneOffset: 330 });
console.log('Dasha:', p.dasha);
import {
tithiNames, // 30 Tithi names (Pratipada to Amavasya)
nakshatraNames, // 27 Nakshatra names (Ashwini to Revati)
yogaNames, // 27 Yoga names (Vishkumbha to Vaidhriti)
rashiNames, // 12 Rashi names (Mesha to Meena)
masaNames, // 12 Masa names (Chaitra to Phalguna)
rituNames, // 6 Ritu names (Vasanta to Shishira)
dayNames // 7 Day names (Ravivaar to Shanivaar)
} from '@ishubhamx/panchangam-js';
The library requires timezone offset in minutes for accurate sunrise-anchored calculations.
function getTimezoneOffset(timeZone: string, date: Date): number {
const str = date.toLocaleString('en-US', { timeZone, timeZoneName: 'longOffset' });
const match = str.match(/GMT([+-]\d{1,2}):?(\d{2})?/);
if (!match) return 0;
const sign = match[1].startsWith('+') ? 1 : -1;
const hours = parseInt(match[1].replace(/[+-]/, ''), 10);
const minutes = match[2] ? parseInt(match[2], 10) : 0;
return sign * (hours * 60 + minutes);
}
const offset = getTimezoneOffset('Asia/Kolkata', new Date()); // 330
| Location | Timezone | Offset (minutes) |
|---|---|---|
| India | Asia/Kolkata | 330 |
| Nepal | Asia/Kathmandu | 345 |
| Sri Lanka | Asia/Colombo | 330 |
| UK | Europe/London | 0 |
| US East | America/New_York | −300 |
| US West | America/Los_Angeles | −480 |
| Singapore | Asia/Singapore | 480 |
| Australia | Australia/Sydney | 660 |
Full TypeScript definitions included:
import type {
Panchangam,
PanchangamOptions,
PlanetaryPosition,
TithiTransition,
NakshatraTransition,
Festival,
DashaResult,
ChoghadiyaResult,
GowriResult,
TarabalamInfo,
DishaShoola,
ChandrashtamaInfo
} from '@ishubhamx/panchangam-js';
astronomy-engine| Platform | Status |
|---|---|
| Node.js 18+ | ✅ Supported |
| Chrome/Edge 90+ | ✅ Supported |
| Firefox 88+ | ✅ Supported |
| Safari 14+ | ✅ Supported |
| React Native | ✅ Supported |
CommonJS (require()) | ✅ Supported |
ESM (import) | ✅ Supported |
| Metric | Value |
|---|---|
| Calculation time | ~5–10 ms per date |
| Memory usage | ~2 MB |
| Network calls | Zero (fully offline) |
This library is ideal for building:
hindu calendar api, panchangam javascript, panchang npm, tithi calculator, nakshatra finder, today panchang, daily panchangam, vedic calendar library, jyotish software, hindu festival api, kundli software javascript, birth chart calculator, horoscope matching api, gun milan api, choghadiya today, rahu kalam today, auspicious time calculator, muhurta calculator, dasha calculator, vimshottari dasha, planetary positions api, sunrise sunset api, indian calendar npm, lunar calendar javascript, hindu month calculator, ekadashi dates, sankranti dates, tamil panchangam, telugu panchangam, kannada panchangam, marathi panchang, gujarati panchang, north indian panchang, south indian panchangam, drik panchang api alternative, swiss ephemeris javascript, ayanamsa calculator, lahiri ayanamsa, udaya tithi, panchang widget, React panchang component, Node.js astrology library
MIT License — see LICENSE
Built with astronomy-engine for precise Swiss Ephemeris calculations.
Made with ❤️ for preserving Vedic astronomy traditions
FAQs
Enhanced Indian Panchangam (Hindu Calendar) library with comprehensive Vedic features including Muhurta calculations, planetary positions, Rashi placements, and auspicious/inauspicious time calculations
The npm package @ishubhamx/panchangam-js receives a total of 453 weekly downloads. As such, @ishubhamx/panchangam-js popularity was classified as not popular.
We found that @ishubhamx/panchangam-js demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.