No description
Find a file
2024-05-25 10:30:52 +02:00
docs documentation update 2024-05-23 08:49:25 +02:00
src documentation update 2024-05-10 08:43:05 +02:00
tst documentation update 2024-05-10 08:43:05 +02:00
.gitignore documentation update 2024-05-23 08:49:25 +02:00
config.nims documentation update 2024-05-09 10:41:03 +02:00
easter.nimble documentation update 2024-05-23 08:49:25 +02:00
LICENSE.md first commit 2024-05-05 18:56:04 +02:00
README.md documentation update 2024-05-25 10:30:52 +02:00

Easter

License: MIT

Introduction

Unlike Christmas which is always on December 25, the date of Easter Sunday varies from year to year. However, there are algorithms that allow you to calculate this date for any past, present or future year.

The algorithm that was implemented in this module is described here and its results were successfully compared to the 518 Easter Sunday dates that can be found on these webpages:

Compatibility

Nim +2.0.0

Dependencies

Nim standard library only.

Getting started

Install easter using nimble:

nimble install easter

or add a dependency to the .nimble file of your project:

requires "easter >= 0.1.0"

and start using it:

import easter

let easterSunday2054 = gregorianEasterSundayMMDD(2054)

# the 'gregorianEasterSundayMMDD' proc returns an Option
# for the reasons given in the documentation

doAssert:  easterSunday2054 is Option[(int, int)]
doAssert:  get(easterSunday2054) == (month: 3, monthday: 29)

Documentation

API Reference