Historical Dates
Master:
Develop:
JavaScript/TypeScript library for converting/calculating Roman and Easter dates. Based on Axel Findling's Roman date converter and Nikolaus A. Bär's easter date calculator.
Friend: Do dates make you nervous?
Me: omg yes especially when doing math across timezone boundaries
— Daniel Cousineau (@dcousineau) August 3, 2016
Get Started
npm install historical-dates
Determining the dates of Easter
import { calcEaster } from 'historical-dates';
let easter = calcEaster(1400, 'julian');
console.log(easter.sunday);
Parsing Roman dates
import { RomanDate } from 'historical-dates';
let romanDate = RomanDate.fromString('prid kal. mar mdc', 'gregorian');
console.log(romanDate);
console.log(romanDate.toDate());
Converting Julian and Gregorian dates
import { createDate } from 'historical-dates';
let julianDate = createDate(1582, 10, 5, 'julian');
let gregorianDate = julianDate.toGregorian();
console.log(gregorianDate);