hebrew-date-converter
v1.0.3
Published
A TypeScript/JavaScript library for converting between Gregorian and Hebrew calendar dates using @hebcal/core.
Readme
Hebrew–Gregorian Converter
A TypeScript/JavaScript library for converting between Gregorian and Hebrew calendar dates using @hebcal/core.
Features
- Gregorian → Hebrew conversion
- Hebrew → Gregorian conversion
- Hebrew numerals (Gematria)
- Flexible Hebrew month parsing
- Leap year support
Installation
npm install hebrew-date-converter @hebcal/core
Usage
import { toGregorian, toHebrew } from "hebrew-date-converter";
toGregorian("תשפד", "טבת", "יא");
toHebrew("2026-01-01");
API
toGregorian(yearStr, monthStr, dayStr)
Converts Hebrew date → Gregorian date.
Parameters:
- yearStr: string
- monthStr: string
- dayStr: string
Returns: { year: number; month: number; day: number; }
Example: toGregorian("תשפד", "טבת", "יא");
toHebrew(date)
Converts Gregorian → Hebrew date.
Parameters:
- date: Date | string
Returns: { year: string; month: number; monthName: string; day: string; label: string; }
Example: toHebrew("2026-01-01");
Supported Hebrew Months
ניסן, אייר, סיוון, תמוז, אב, אלול, תשרי, חשוון/חשון, כסלו, טבת, שבט, אדר (א/ב)
Notes
- Built on @hebcal/core
- Handles Hebrew punctuation variants
- Leap years supported automatically
License
MIT
