sponsor Vim development Vim logo Vim Book Ad

easter : compute the date of Gregorian Easter for a given year

 script karma  Rating 0/0, Downloaded by 289  Comments, bugs, improvements  Vim wiki

created by
Antoine Mechelynck
 
script type
utility
 
description
easter#date(year), where year is an integer > 1582, returns (if no error) a Dictionary with keys 'year' 'month' and 'day'. Each key value is an integer.

- Strings are converted to integers the usual Vim way
- Floats are truncated to an Integer by discarding any fractional part
- Other non-integer types, or values < 1583, cause an error and return an empty Dictionary.

Years in the far future are accepted but may cause unspecified behaviour (e.g. there is talk of making years 4000, 8000, 12000, etc. non-leap: this eventuality has not been taken into account).

See also the comments in the script source.

Known limitation: To be used for Gregorian Easter only. Dates for Julian (Orthodox) Easter, or for Pesach, are nor computed.
 
install details
Drop the script in the autolad/ subdirectory of a 'runtimepath' directory other than $VIMRUNTIME
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
easter.vim 1.0 2020-05-03 7.0 Antoine Mechelynck Initial upload
ip used for rating: 3.236.252.14

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github