2.0.0 • Published 7 years ago

ethiopic-calendar v2.0.0

Weekly downloads
9
License
MIT
Repository
github
Last release
7 years ago

Ethiopic-Calendar Build Status

JavaScript implementation of Beyene-Kudlek algorithm.

Installation

npm install ethiopic-calendar --save

Usage

const { isGregorianLeap, gj, je, eg, ge, AA, AM  } = require('ethiopic-calendar');

// isGregorianLeap(Year) -> Boolean;
// gj(Year, Month, Day) -> Number; given Gregorian returns JDN
// je(JDN[, era]) -> { year, month, day }; given JDN returns Ethiopic equivalent
// eg(year, month, day[, era]) -> { year, month, day }; converts Ethiopic to Gregorian
// ge(year, month, day) -> { year, month, day }; converts Gregorian to Ethiopic
// AA -> Number; ዓ/ዓ JD offset
// AM -> Number; ዓ/ም JD offset (default era for je and eg)

TODO

  • Pass ESLint rules
  • Tests
  • Make functions pure