Date and TimeΒΆ
The time class defines both calendar time and time period.
time
defines time objects.
:now **
(instance time :now)
creates a time object for the current time.
:init &optional sec micro dst tzone
creates a time object which represents sec second after January 1, 1970.
:make &key (year 1970) (month 0) (day 1) (weekday 4) (hour 0) (minute 0) (second 0) (micro 0) (timezone (* -9 3600)))
creates a time object which is represented by a calendar notation. The timezone is defaulted to JST.
:year **
returns the year component of the time object. Note that the year is represented in a full (four) digit notation, not the least two digits.
:month **
returns the month component of the time object. Note that the month begins from 0 for January.
:day **
returns the day component of the time object. Note that the day begins from 1 for the first of a month.
:weekday **
returns the weekday component of the time object. Note that the weekday begins from 0 for Sunday.
:hour **
returns the hour component of the time object in 24-hour representation. Note that the hour ranges from 0 to 23.
:minute **
returns the minute component of the time object. Note that the hour ranges from 0 to 59.
:second **
returns the second component of the time object. Note that the hour ranges from 0 to 59.
:seconds **
returns the seconds component of the time object. Seconds represents time after the origin of the unix time, i.e., the midnight of January 1, 1970.
:year-day **
returns the number of days after the beginning of the year. For example, year-day of a time object representing February 2nd is 32.
:difference atime
returns a new time object representing the time difference of self from atime.
:add atime
returns a new time object representing the added time of self and atime.