Next: , Up: srfi time spec   [Index]


2.11.3.1 Introduction

A time object, which is distinct from all existing types, defines a point in time or a time duration in some standard time system. The standard time systems are:

Implementations are required to implement UTC, monotonic time, CPU time in current process, and time duration. Implementations are allowed to create extensions (for example, amount of time spent in garbage collection).

A time object consists of three components:

Time type

A symbol representing the time system representation used. The constants time-tai, time-utc, time-monotonic, time-thread, time-process, and time-duration must be provided for these symbols. Implementations should provide constants for time type extensions.

Second

An integer representing the number of whole seconds from “the epoch”.

Nanosecond

An integer of the number of nanoseconds in the fractional portion. Although a time object has nanosecond precision, clocks may have a lower resolution.

A date object, which is distinct from all existing types, represents a point in time as represented by the Gregorian calendar as well as by a time zone. date objects are immutable. A date object consists of the following components:

Nanosecond

An integer between 0 and 999,999,999, inclusive.

Second

An integer 0 and 60, inclusive, (60 represents a leap second).

Minute

An integer between 0 and 59, inclusive.

Hour

An integer between 0 and 23, inclusive.

Day

An integer between 0 and 31, inclusive, the upper limit depending on the month and year of the point in time.

Month

An integer between 1 and 12, inclusive; in which 1 means January, 2 February, and so on.

Year

An integer representing the year.

Time zone

A integer the number of seconds east of GMT for this timezone.

A Julian Day represents a point in time as a real number of days since -4714-11-24T12:00:00Z (November 24, -4714 at noon, UTC).

A Modified Julian Day represents a point in time as a real number of days since 1858-11-17T00:00:00Z (November 17, 1858 at midnight, UTC).


Next: , Up: srfi time spec   [Index]