Time-Instant
Description
- A Temporal-Entity of zero duration or one that can be considered "point-like"
for its application.
Syntax
-
(a Time-Instant with (<slot> (<value> ...))) |
(<Time-Instant-instance> has (<slot> (<value> ...))) |
Slots
- There must be at most one (:pair) for each UoM-Time, at
most one Day-Constant and at most one Time-Zone-Constant in each time-value
structure. The times must also be "normalized": years are integers, months are
the integers 1-12, days are integers 1-31, hours are integers 0-23, minutes
are integers 0-59 and seconds are real numbers < 60.
The time-year, time-month, etc. slots can be used along with or instead of the
time-value structure. Values are copied automatically between the time-value
structure and the more specific accessor slots.
The time-iCalendar-date-time-string slot can be queried for an iCalendar-format
date-time string (yyyymmddThhmmssZ). This slot should only be queried, as its
value is computed from the time-value structure. The slot deviates from the
iCalendar spec in two important ways: first, fields with unknown values appear
as zeros; second, the trailing Z always appears and does not reflect any time
zone information (as currently required by the Action group's Task Manager).
The time-xmls-date-time-string slot can be queried for an XML Schema-format
date-time string (yyyy-mm-ddThh:mm:ss). This slot should only be queried, as its
value is computed from the time-value structure. In keeping with the XML Schema
dateTime type, date fields with unknown values appear as 1 and time fields with
unknown values appear as 0. Time zone information is not recorded (all times
are considered "local").
slot | card | value | slot inverse |
time-value | 8 | (:pair (a Number) (a UoM-Time))
...
(a Day-Constant)
(a Time-Zone-Constant) | time-value-of |
time-year | 1 | (a Number) | time-year-of |
time-month | 1 | (a Number) | time-month-of |
time-day | 1 | (a Number) | time-day-of |
time-day-of-week | 1 | (a Day-Constant) | time-day-of-week-of |
time-hour | 1 | (a Number) | time-hour-of |
time-minute | 1 | (a Number) | time-minute-of |
time-second | 1 | (a Number) | time-second-of |
time-zone | 1 | (a Time-Zone-Constant) | time-zone-of |
time-iCalendar-date-time-string | 1 | (a String) | |
time-xmls-date-time-string | 1 | (a String) | |
+ slots inherited from Temporal-Entity |
Examples
-
(a Time-Instant with
(time-value ((:pair 2003 *year)
(:pair 12 *month)
(:pair 18 *day)
(:pair 15 *hour)
(:pair 5 *minute)
(:pair 45 *second)
*Thursday
*CST
))
)
KM> (the time-iCalendar-date-time-string of (thelast Time-Instant))
("20031218T150545Z")
KM> (the time-xmls-date-time-string of (thelast Time-Instant))
("2003-12-18T15:05:45") |
|
(a Time-Instant with
(time-year (2003))
(time-month (12))
(time-day (18))
(time-hour (15))
(time-minute (5))
(time-second (45))
(time-day-of-week (*Thursday))
(time-zone (*CST))
) |
|
(a Time-Instant with
(time-value ((:pair 2 *month)))
(time-day (27))
)
KM> (the time-iCalendar-date-time-string of (thelast Time-Instant))
("00000227T000000Z")
KM> (the time-iCalendar-date-time-string of (thelast Time-Instant))
("0001-02-27T00:00:00") |
|