A comprehensive TypeScript library for Jewish calendar calculations, date conversions, and Zmanim (Jewish time calculations).
- Convert between Gregorian and Hebrew dates
- Calculate Jewish holidays and special dates
- Determine Zmanim (halachic times) for any location
- Support for Parsha of the week calculations
- Hebrew date formatting
- Comprehensive handling of Jewish calendar rules
- Written in TypeScript with full type safety
- Well-documented API
- Thoroughly tested
npm install jewish-calendar
import { HebrewDate, GregorianDate, Zmanim } from 'jewish-calendar';
// Convert Gregorian to Hebrew date
const hebrewDate = HebrewDate.fromGregorian(new Date());
console.log(hebrewDate.toString()); // Returns Hebrew date in English or Hebrew
// Get Zmanim for a location
const zmanim = new Zmanim({
latitude: 31.7767,
longitude: 35.2345,
elevation: 754,
timeZone: 'Asia/Jerusalem'
});
console.log(zmanim.getSunrise()); // Get sunrise time
console.log(zmanim.getSunset()); // Get sunset time
// Get upcoming holidays
const holidays = HebrewDate.getUpcomingHolidays();
Converts a Gregorian date to a Hebrew date.
Converts a Hebrew date to a Gregorian date.
Creates a new Zmanim calculator with the specified location options.
And many more methods for various halachic times.
Contributions are welcome! Please feel free to submit a Pull Request. Make sure to read the contributing guidelines first.
MIT © Dovid