date-easter
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

date-easter

NPM version Build Status

Calculates Easter for a given year

Synopsis

// ES5
import {easter, gregorianEaster, julianEaster, orthodoxEaster} from 'date-easter'
// cjs
const {easter, gregorianEaster, julianEaster, orthodoxEaster} = require('date-easter')

easter(2016)
// { year: 2016, month: 3, day: 27 }
gregorianEaster(new Date('2016-01-01'))
// { year: 2016, month: 3, day: 27 }
julianEaster(2016)
// { year: 2016, month: 4, day: 18 }
orthodoxEaster(2016)
// { year: 2016, month: 5, day: 1 }

Description

All methods return an object with the following properties

  • year: Year (begins at 0)
  • month: Month (1 ... 12)
  • day: Day (1 ... 31)
  • toString(): Returns a formatted String YYYY-MM-DD

easter

Shortcut for gregorianEaster.

gregorianEaster

Returns the date of Gregorian Easter for a given year. Uses the extended Gaussian Easter algorithm.

julianEaster

Returns the date of Julian Easter for a given year in the Julian Calender

orthodoxEaster

Returns the date of Julian Easter for a given year in the Gregorian Calender

References

License

Copyright (c) 2015 commenthol

Software is released under MIT.

Readme

Keywords

Package Sidebar

Install

npm i date-easter

Weekly Downloads

90,720

Version

1.0.3

License

MIT

Unpacked Size

10.7 kB

Total Files

6

Last publish

Collaborators

  • commenthol