Skip to content

hazzik/julian-gregorian

 
 

Repository files navigation

Julian-Gregorian

Converts calendar dates between the julian and gregorian calendar. It implements the calculation model from wikipedia

Usage

import CalendarConverter from "julian-gregorian";
console.log(
    CalendarConverter.fromGregorianToJulian({ year: 2018, month: 8, day: 9 })
); // -> { year: 2018, month: 7, day: 27 }
console.log(
    CalendarConverter.fromJulianToGregorian({ year: 1501, month: 1, day: 1 })
); // -> { year: 1501, month: 1, day: 11 }

API

CalendarConverter.fromGregorianToJulian({ year, month, day })

Converts a Gregorian calendar date into a Julian calendar date

CalendarConverter.fromGregorianToJulian({ year, month, day })

Converts a Julian calendar date into a Gregorian calendar date

License

MIT

Author

tobinski

About

Converts calendar dates between the julian and gregorian calendar

Resources

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages

  • TypeScript 100.0%