Jewish Date ·

Jewish Date is a Hebrew Date to Gregorian Date and vice versa converter
- 🌐 Works with both Node.js and the browser
- 📦 2.5kB mini library (minified & gzip)
- 📜 MIT License
- 🔧 Easy to use
Installation
yarn add jewish-date
Or with npm
npm install jewish-date --save
Usage
TypeScript & ES6 example
import {
toJewishDate, formatJewishDate, toHebrewJewishDate, formatJewishDateInHebrew, toGregorianDate, JewishMonth
} from "jewish-date";
const date = new Date("2020-01-01");
const jewishDate = toJewishDate(date);
console.log(jewishDate);
const jewishDateInEnglish = formatJewishDate(jewishDate);
console.log(jewishDateInEnglish);
const jewishDateInHebrew = toHebrewJewishDate(jewishDate);
console.log(jewishDateInHebrew);
const jewishDateInHebrewStr = formatJewishDateInHebrew(jewishDate);
console.log(jewishDateInHebrewStr);
const date2 = toGregorianDate({ year: 5780, monthName: JewishMonth.Tevet, day: 4 });
console.log(date2);
For ES5
Replace
import {
toJewishDate, formatJewishDate, toHebrewJewishDate, formatJewishDateInHebrew, toGregorianDate, JewishMonth
} from "jewish-date";
With
const {
toJewishDate, formatJewishDate, toHebrewJewishDate, formatJewishDateInHebrew, toGregorianDate, JewishMonth
} = require("jewish-date");
License
Jewish Date is MIT licensed.