[ANN] Request for review and beta-testing 'Calendars.jl'

So maybe it should be called a pre-announcement…

The package Calendars.jl provides an implementation of the Common (CE), Julian (JD), Hebrew (AM) and Islamic (AH) and ISO 8601 (ID) calendars. The Common calendar is the ‘proleptic Gregorian’ calendar.

We also offer a ‘European calendar’ (EC), which is a hybrid: it shows the dates of the Julian calendar up to 4 October 1582 and after that, the Gregorian dates.

In addition, we offer two consecutive numbering of the days, the Julian numbers (JN), which is the count of days since the beginning of the Julian Period in 4713 BCE and the European numbers (EN), which is an ordinal day number beginning at Julian 0001-01-01.

We propose a calendar date ‘CDate’, which is a pair (CA, YMD) where CA is a calendar specifier, and YMD is a 3-tuple of integers which, as a string, is written “YYYY-MM-DD”. Internally we also represent a calendar specifier as an integer. Thus a CDate is implemented as a 4-tuple of integers prefixing the calendar date representation with an integer-encoded calendar specifier.

The main functionality of the package is to convert data from one calendar to another, for instance, like

julia> ConvertDate("Common", 1756, 1, 27, "Hebrew")

which can also be written using the calendar specifiers as

julia> ConvertDate(CE, 1756, 1, 27, AM)

Another key function returns a table of the dates of all supported calendars. For example

julia> CalendarDates("European", 1452, 4, 15, true) 

returns (and/or prints) the table

European   EC-1452-04-15
Common     CE-1452-04-24
Julian     JD-1452-04-15
Hebrew     AM-5212-01-26
Islamic    AH-0856-03-25
IsoDate    ID-1452-17-06
EuroNum    EN#0530083
JulianNum  JN#2251506

We use the algorithms by Nachum Dershowitz and Edward M. Reingold from Calendrical Calculations. Unlike many online calendars, these algorithms use only integers and are generally more robust.

The package is registered, so you can install it with Pkg.add(“Calendars”). The source is in the repository and the docs on JuliaHub.

If you find any errors, please notify us immediately via the issues page. Thank you for any suggestions for improvement.