On this page:
now
9.0
top
up

14Current Date and Time🔗 i

parameter

( current-clock )(->rational? )

(current-clock clock)void?
clock:(->rational? )
A parameter that defines the current clock used by all functions that require the current time. A clock is simply a nullary function that returns the number of seconds since the UNIX epoch. The default value is current-posix-seconds .

Returns the number of seconds since the UNIX epoch as a rational number. This function is implemented as:

procedure

( today [#:tztz])date?

procedure

( today/utc )date?

Returns the current date in the specified time zone.

Example:
(today #:tz"America/Chicago")))

'(#<date 1970年01月01日> #<date 1969年12月31日>)

procedure

( current-time [#:tztz])time?

procedure

( current-time/utc )time?

Returns the current time in the specified time zone.

Example:
(current-time #:tz"America/Chicago")))

'(#<time 00:00:00> #<time 18:00:00>)

procedure

( now [#:tztz])datetime?

procedure

( now/utc )datetime?

Returns the current datetime in the specified time zone.

Example:
(now #:tz"America/Chicago")))

'(#<datetime 1970年01月01日T00:00:00> #<datetime 1969年12月31日T18:00:00>)

procedure

( now/moment [#:tztz])moment?

procedure

( now/moment/utc )moment?

Returns the current moment in the specified time zone.

Example:
(now/moment #:tz"America/Chicago")))

'(#<moment 1970年01月01日T00:00:00Z[Etc/UTC]>

#<moment 1969年12月31日T18:00:00-06:00[America/Chicago]>)

top
up

AltStyle によって変換されたページ (->オリジナル) /