1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
|
\section{Date and Time}
The time class defines both calendar time and time period.
\begin{refdesc}
\classdesc{time}{propertied-object}{
(micro second minute hour day month weekday year \\
\> timezone dst seconds)}{
defines time objects.
}
\methoddesc{:now}{}{
\verb~(instance time :now)~
creates a time object for the current time.}
\methoddesc{:init}{\&optional sec micro dst tzone}{
creates a time object which represents {\it sec} second
after January 1, 1970.}
\methoddesc{: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.}
\methoddesc{: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.}
\methoddesc{:month}{}{returns the month component of the time object.
Note that the month begins from 0 for January.}
\methoddesc{:day}{}{returns the day component of the time object.
Note that the day begins from 1 for the first of a month.}
\methoddesc{:weekday}{}{returns the weekday component of the time object.
Note that the weekday begins from 0 for Sunday.}
\methoddesc{:hour}{}{returns the hour component of the time object
in 24-hour representation.
Note that the hour ranges from 0 to 23.}
\methoddesc{:minute}{}{returns the minute component of the time object.
Note that the hour ranges from 0 to 59.}
\methoddesc{:second}{}{returns the second component of the time object.
Note that the hour ranges from 0 to 59.}
\methoddesc{: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.}
\methoddesc{: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.}
\methoddesc{:difference}{atime}{returns a new time object
representing the time difference of self from atime.}
\methoddesc{:add}{atime}{returns a new time object
representing the added time of self and atime.}
\end{refdesc}
|