The Date module contains a single class, <date>, an instance of which can represent any date between 1 Jan 1800 00:00:00 and 31 Dec 2199 23:59:59, Greenwich Mean Time. You can create a date object by calling the function encode-date or using the make method for <date>.
Sealed class
<number>. Note that there is no method for make defined on <date>. The function encode-date should be used instead.
G.f. method
make date-class #key iso8601-string year month day hours minutes
seconds microseconds time-zone-offset
=> date-instance
<date> class.
Function
encode-date year month day hours minutes seconds
#key microseconds time-zone-offset => date
<date> object from a set of <integer> values.
Each of the arguments to encode-date and to the make method on <date> is an instance of <integer> (except for the iso8601-string keyword for the make method, which is a string) that is passed as an init-keyword value to the <date> object. Each init-keyword takes an instance of <integer>, limited to the natural range for that attribute. For example, month: can only take values between 1 and 12.
You must specify values, via encode-date, for at least the year:, month:, and day: init-keywords. In addition, you can also specify values for hours:, minutes:, seconds:, microseconds:, and time-zone-offset:. If not supplied, the default value for each of these init-keywords is 0.
The time-zone-offset: init-keyword is used to represent time zones in the Date module as <integer> values representing the offset in minutes from Greenwich Mean Time (GMT). Positive values are used for time zones East of Greenwich; negative values represent time zones to the west of Greenwich.
For example, the value -300 (-5 hours) is U.S. Eastern Standard Time and the value -240 (-4 hours) is U.S. Eastern Daylight Savings Time.
If you wish, a <date> can be specified completely by using the iso8601-string: init-keyword. This init-keyword takes an instance of <string>, which should be a valid ISO8601 format date. If you use the iso8601-string: init-keyword, there is no need to specify any other init-keywords to a call to make on <date>.
Function
current-date () => date
<date> object.
Type
one-of(#"Sunday", #"Monday", #"Tuesday", #"Wednesday",
#"Thursday", #"Friday", #"Saturday")
<day-of-week> type.
date-day-of-week. See Section 7.5 for details.