Skip to content

📆 Convert the date objects into the Hebrew calendar correspondant.

License

Notifications You must be signed in to change notification settings

do34/hebrew-date

 
 

Repository files navigation

hebrew-date

Convert the date objects into the Hebrew calendar correspondant.

Installation

$ npm i hebrew-date

Example

"use strict";

var hebrewDate = require("..");

// When not providing a date object, the months are one-indexed
console.log(hebrewDate(2016, 10, 2));
// { year: 5776, month: 13, date: 29, month_name: 'Elul' }

var october = 9;
console.log(hebrewDate(new Date(2016, october, 3)));
// { year: 5777, month: 1, date: 1, month_name: 'Tishri' }

Documentation

hebrewDate(inputDate, inputMonth, inputDate)

Convert the Gregorian dates into Hebrew calendar dates.

Params

  • Date|Number inputDate: The date object (representing the Gregorian date) or the year.
  • Number inputMonth: The Gregorian month (one-indexed, January being 1!).
  • Number inputDate: The Gregorian date.

Return

  • Object An object containing:
  • year: The Hebrew year.
  • month: The Hebrew month.
  • month_name: The Hebrew month name.
  • date: The Hebrew date.

How to contribute

Have an idea? Found a bug? See how to contribute.

License

See the LICENSE file.

About

📆 Convert the date objects into the Hebrew calendar correspondant.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%