Warning: This is the manual of the legacy Guile 2.2 series. You may want to read the manual of the current stable series instead.
Next: SRFI-19 Time/Date conversions, Previous: SRFI-19 Time, Up: SRFI-19 [Contents][Index]
A date object represents a date in the Gregorian calendar and a time of day on that date in some timezone.
The fields are year, month, day, hour, minute, second, nanoseconds and timezone. A date object is immutable, its fields can be read but they cannot be modified once the object is created.
Historically, the Gregorian calendar was only used from the latter part of the year 1582 onwards, and not until even later in many countries. Prior to that most countries used the Julian calendar. SRFI-19 does not deal with the Julian calendar at all, and so does not reflect this historical calendar reform. Instead it projects the Gregorian calendar back proleptically as far as necessary. When dealing with historical data, especially prior to the British Empire’s adoption of the Gregorian calendar in 1752, one should be mindful of which calendar is used in each context, and apply non-SRFI-19 facilities to convert where necessary.
Return #t
if obj is a date object, or #f
if not.
Create a new date object.
Nanoseconds, 0 to 999999999.
Seconds, 0 to 59, or 60 for a leap second. 60 is never seen when working entirely within UTC, it’s only when converting to or from TAI.
Minutes, 0 to 59.
Hour, 0 to 23.
Day of the month, 1 to 31 (or less, according to the month).
Month, 1 to 12.
Year, eg. 2003. Dates B.C. are negative, eg. -46 is 46 B.C. There is no year 0, year -1 is followed by year 1.
Time zone, an integer number of seconds east of Greenwich.
Day of the year, starting from 1 for 1st January.
Day of the week, starting from 0 for Sunday.
Week of the year, ignoring a first partial week. dstartw is the day of the week which is taken to start a week, 0 for Sunday, 1 for Monday, etc.
Return a date object representing the current date/time, in UTC offset by tz-offset. tz-offset is seconds east of Greenwich and defaults to the local timezone.
Return the current Julian Day.
Return the current Modified Julian Day.
Next: SRFI-19 Time/Date conversions, Previous: SRFI-19 Time, Up: SRFI-19 [Contents][Index]