Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

historical-dates

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

historical-dates

JavaScript/TypeScript library for converting/calculating Roman and Easter date

  • 0.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

Historical Dates

NPM Master: Build Status Develop: Build Status

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);
// 1400-4-18 (Julian)

Parsing Roman dates

import { RomanDate } from 'historical-dates';

let romanDate = RomanDate.fromString('prid kal. mar mdc', 'gregorian');
console.log(romanDate);
// pridie Kal. Mart. MDC
console.log(romanDate.toDate());
// 1600-2-28

Converting Julian and Gregorian dates

import { createDate } from 'historical-dates';

let julianDate = createDate(1582, 10, 5, 'julian');
let gregorianDate = julianDate.toGregorian();
console.log(gregorianDate);
// 1582-10-15

Keywords

FAQs

Package last updated on 02 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc