Gregor provides a date struct that represents a calendar date without a time
or time zone. Unfortunately, the name date conflicts with an
existing, incompatible definition in racket/base.
The author of this package considered other names, including Date (with a capital D)
and local-date (à la Joda-Time)
but in the end decided to live with the incompatibility. Gregor’s date,
along with its companion data structures (time, datetime, and
moment) should be considered a replacement of, not a supplement to, the
built-in Racket date.
(date year [month day]) → date?
| year : exact-integer?|
| month : (integer-in 1 12) = 1|
| day : (day-of-month/c year month) = 1|
Constructs a date
with the given year
, and day
|> (date 1941 12 7)|
|> (date 1965 7)|
|> (date 1970)|
is a date
Returns the date
corresponding to the given
Julian day number
, which is the
number of solar days that have elapsed since 12:00 UT on November 24, 4714 BC in the
proleptic Gregorian calendar.
Returns an ISO 8601 string representation of d.
Comparison functions on dates.
An order defined on dates.