@the_hazzik/julian-gregorian-converter
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

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

Package Sidebar

Install

npm i @the_hazzik/julian-gregorian-converter

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

10.8 kB

Total Files

8

Last publish

Collaborators

  • the_hazzik