temporalconverter
v0.6.0
Published
TemporalConverter is a Javascript module for converting dates between different calendars.
Downloads
6
Readme
TemporalConveter
TemporalConverter is a Javascript module for converting dates between different calendars. Need to quickly convert Kōki 2503 to Gregorian Calendar? TemporalConverter can help you achieve that.
Installation
npm install temporalconverter
Import example
Using ESM
import temporalConverter from 'temporalconverter'
const kokiYear = 500
const returnvalue = temporalConverter.KokiToFormattedGregorian(kokiYear)
console.log(returnvalue) // "160 BCE"
Using commonJS
const temporalConverter = require('temporalconverter')
const kokiYear = 500
const returnvalue = temporalConverter.KokiToFormattedGregorian(500)
console.log(returnvalue) // "160 BCE"
Testing
A test report is included in the tests folder of this repository. To run these tests locally simply fork or download this repository, install the dependencies and run:
npm run test
Japanese Era during Nanboku-chō period
Currently all Japanese Era conversions between 1329 and 1390, the Nanboku-chō period, are done using the Northern Courts eras. Future release may allow an option to use Southern Court eras instead. For more information
License
Part of a laboration in the course 1DV610 at Linnèuniversitet. Published under MIT License.