6.2.901.900
8 Generic Time Operations
value
gen:time-provider : any/c
procedure
(time-provider? x) → boolean
x : any/c
procedure
t : time-provider?
Returns the local time corresponding to t.
Examples: | ||||||
|
procedure
(->hours t) → (integer-in 0 23)
t : time-provider?
Returns the hour of the day from t.
Examples: | ||||||
|
procedure
(->minutes t) → (integer-in 0 59)
t : time-provider?
Returns the minute of the hour from t.
Examples: | ||||||
|
procedure
(->seconds t [fractional?])
→
(if fractional? (and/c rational? (>=/c 0) (</c 60)) (integer-in 0 59)) t : time-provider? fractional? : boolean? = #f
Returns the seconds from t. If fractional? is #t,
then the fraction of the second will be included; otherwise, the result is
an integer.
Examples: | ||||||
|
procedure
(->milliseconds t) → exact-integer?
t : time-provider?
Returns the milliseconds from t.
Examples: | ||||||
|
procedure
(->microseconds t) → exact-integer?
t : time-provider?
Returns the microseconds from t.
Examples: | ||||||
|
procedure
(->nanoseconds t) → exact-integer?
t : time-provider?
Returns the nanoseconds from t.
Examples: | ||||||
|
procedure
(on-date t d [#:resolve-offset resolve]) → datetime-provider?
t : time-provider? d : date-provider? resolve : offset-resolver/c = resolve-offset/raise
Combines the time fields of t with the date fields of d to
produce a datetime provider. Any time zone information from t will
be preserved in the result.
Examples: | |||||||||
|