Skip to main content

Module Now

Module Now 

Source
Expand description

The Temporal.Now object has several methods which give information about the current date, time, and time zone.

MDN Documentation

Functions§

instant
The Temporal.Now.instant() static method returns the current exact time as a Temporal.Instant.
plain_date_iso
The Temporal.Now.plainDateISO() static method returns the current date as a Temporal.PlainDate in the ISO 8601 calendar and the system’s current time zone.
plain_date_iso_with_time_zone
The Temporal.Now.plainDateISO() static method returns the current date as a Temporal.PlainDate in the ISO 8601 calendar and the given time zone.
plain_date_iso_with_zoned_date_time
Temporal.Now.plainDateISO() in the time zone of the given Temporal.ZonedDateTime.
plain_date_time_iso
The Temporal.Now.plainDateTimeISO() static method returns the current date and wall-clock time as a Temporal.PlainDateTime in the ISO 8601 calendar and the system’s current time zone.
plain_date_time_iso_with_time_zone
The Temporal.Now.plainDateTimeISO() static method returns the current date and wall-clock time as a Temporal.PlainDateTime in the ISO 8601 calendar and the given time zone.
plain_date_time_iso_with_zoned_date_time
Temporal.Now.plainDateTimeISO() in the time zone of the given Temporal.ZonedDateTime.
plain_time_iso
The Temporal.Now.plainTimeISO() static method returns the current wall-clock time as a Temporal.PlainTime in the system’s current time zone.
plain_time_iso_with_time_zone
The Temporal.Now.plainTimeISO() static method returns the current wall-clock time as a Temporal.PlainTime in the given time zone.
plain_time_iso_with_zoned_date_time
Temporal.Now.plainTimeISO() in the time zone of the given Temporal.ZonedDateTime.
time_zone_id
The Temporal.Now.timeZoneId() static method returns the identifier of the system’s current time zone.
zoned_date_time_iso
The Temporal.Now.zonedDateTimeISO() static method returns the current date and time as a Temporal.ZonedDateTime in the ISO 8601 calendar and the system’s current time zone.
zoned_date_time_iso_with_time_zone
The Temporal.Now.zonedDateTimeISO() static method returns the current date and time as a Temporal.ZonedDateTime in the ISO 8601 calendar and the given time zone.
zoned_date_time_iso_with_zoned_date_time
Temporal.Now.zonedDateTimeISO() in the time zone of the given Temporal.ZonedDateTime.