New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

hebrew-dates

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hebrew-dates

Modern Hebrew/Jewish calendar library for TypeScript — holidays, date conversion, formatting in Hebrew

latest
Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
5
400%
Maintainers
1
Weekly downloads
 
Created
Source

hebrew-dates — Hebrew/Jewish Calendar, Holidays & Date Conversion for TypeScript

npm version npm downloads CI TypeScript License: MIT Zero dependencies

Convert Gregorian to Hebrew dates, look up Jewish holidays, and format in Hebrew — all typed, tree-shakeable, zero dependencies.

import { toHebrew, formatHebrew, getHoliday } from "hebrew-dates";

const hDate = toHebrew(new Date(2024, 9, 3));
formatHebrew(hDate); // "א׳ תשרי תשפ״ה"
getHoliday(hDate); // { name: "Rosh Hashana", nameHe: "ראש השנה" }

Modern Hebrew/Jewish calendar library for TypeScript. Zero dependencies.

hebrew-dates demo — converting Gregorian dates to Hebrew calendar with holiday lookup

Install

npm install hebrew-dates

Usage

import {
  toHebrew,
  toGregorian,
  formatHebrew,
  formatHebrewEn,
  getHoliday,
  getHolidaysInMonth,
} from "hebrew-dates";

const hDate = toHebrew(new Date(2024, 9, 3));
// { year: 5785, month: 7, day: 1 }

formatHebrew(hDate);
// "א׳ תשרי תשפ״ה"

formatHebrewEn(hDate);
// "1 Tishrei 5785"

const holiday = getHoliday(hDate);
// { name: "Rosh Hashana", nameHe: "ראש השנה", type: "major" }

const gregDate = toGregorian({ year: 5785, month: 7, day: 10 });
// Date object for Yom Kippur 5785

const tishrei = getHolidaysInMonth(5785, 7);
// All holidays in Tishrei 5785

API

Date Conversion

FunctionDescription
toHebrew(date: Date)Convert Gregorian to Hebrew date
toGregorian(hDate)Convert Hebrew to Gregorian date

Formatting

FunctionDescription
formatHebrew(hDate)Format as Hebrew string (e.g. "א׳ תשרי תשפ״ה")
formatHebrewEn(hDate)Format as English string (e.g. "1 Tishrei 5785")
getMonthName(month, leap)Hebrew month name
getMonthNameEn(month, leap)English month name

Holidays

FunctionDescription
getHoliday(hDate)Get holiday for a date (or null)
getHolidaysInMonth(year, month)All holidays in a month

Holiday types: major, minor, modern, fast

Calendar Utilities

FunctionDescription
isLeapYear(year)Check if Hebrew year is a leap year
monthsInYear(year)Number of months (12 or 13)
daysInMonth(year, month)Days in a Hebrew month
hebrewYearDays(year)Total days in a Hebrew year

Supported Holidays

Major: Rosh Hashana, Yom Kippur, Sukkot, Shmini Atzeret, Simchat Torah, Pesach, Shavuot

Minor: Chanukah, Purim, Shushan Purim, Tu BiShvat, Lag BaOmer, Tu B'Av, Chol HaMoed

Fast Days: Tzom Gedaliah, Asara B'Tevet, Ta'anit Esther, Shiva Asar B'Tammuz, Tisha B'Av

Modern: Yom HaShoah, Yom HaZikaron, Yom HaAtzmaut, Yom Yerushalayim

Hebrew Month Numbers

#MonthHebrew
1Nisanניסן
2Iyyarאייר
3Sivanסיוון
4Tammuzתמוז
5Avאב
6Elulאלול
7Tishreiתשרי
8Cheshvanחשוון
9Kislevכסלו
10Tevetטבת
11Shevatשבט
12Adar (Adar I in leap years)אדר
13Adar II (leap years only)אדר ב׳

Author

Ofer Shapira

LinkedIn GitHub

License

MIT © Ofer Shapira

Keywords

hebrew

FAQs

Package last updated on 19 Feb 2026

Did you know?

Socket

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.

Install

Related posts