Skip to content

utopiaio/Ethiopic-Calendar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

JavaScript implementation of Beyene-Kudlek algorithm.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published