time¶
Provides time and date operations.
fun mltimeepoch(Arg₁: integer)TBD
fun time::mdays(Year: integer, Month: integer): integerTBD
type timeAn instant in time with nanosecond resolution.
meth time(Seconds: integer): timeReturns a time from the epoch (1970-01-01).
meth time(Seconds: integer, Nanoseconds: integer): timeReturns a time from the epoch (1970-01-01).
meth time(Year: integer, Month: integer, Day: integer, Hour: integer, Minute: integer, Second: integer): timeReturns the time specified by the provided components in the local time.
meth time(Year: integer, Month: integer, Day: integer, Hour: integer, Minute: integer, Second: integer, TimeZone: nil): timeReturns the time specified by the provided components in UTC.
meth time(String: string, Format: string): timeParses the
Stringas a time according to specified format. The time is assumed to be in local time.meth time(String: string, Format: string, TimeZone: nil): timeParses the
Stringas a time according to specified format. The time is assumed to be in UTC.meth time(): timeReturns the current time.
time() :> 2026-05-28T08:38:15.34647
meth time(Year: integer, Month: integer, Day: integer): timeReturns the time specified by the provided components in the local time.
meth time(Year: integer, Month: integer, Day: integer, Hour: integer, Minute: integer, Second: integer, TimeZone: time::zone): timeReturns the time specified by the provided components in the specified time zone.
meth time(Year: integer, Month: integer, Day: integer, TimeZone: nil): timeReturns the time specified by the provided components in UTC.
meth time(Year: integer, Month: integer, Day: integer, TimeZone: time::zone): timeReturns the time specified by the provided components in the specified time zone.
meth time(Seconds: real): timeReturns a time from the epoch (1970-01-01).
meth time(String: string): timeParses the
Stringas a time according to ISO 8601.time("2023-02-09T21:19:33.196413266") :> 2023-02-09T20:19:33.196413
meth time(String: string, Format: string, TimeZone: time::zone): timeParses the
Stringas a time according to specified format in the specified time zone.meth time(String: string, TimeZone: time::zone): timeParses the
Stringas a time in the specified time zone.time("2023-02-09T21:19:33.196413266", time::zone::"America/Chicago") :> 2023-02-10T03:19:33.196413
meth (Time: time) + (Component₁ is Value₁, Arg₃: integer, ...): timeReturns
Timewith the the specified components updated.meth (Start: time) + (Duration: number): timeReturns the time
Durationseconds afterStart.time("2022-04-01 12:00:00") + 3600 :> 2022-04-01T13:00:00
meth (Time: time) - (Component₁ is Value₁, Arg₃: integer, ...): timeReturns
Timewith the the specified components updated.meth (Start: time) - (Duration: number): timeReturns the time
Durationseconds beforeStart.time("2022-04-01 12:00:00") - 3600 :> 2022-04-01T11:00:00
meth (End: time) - (Start: time): realReturns the time elasped betwen
StartandEndin seconds.time("2022-04-01 12:00:00") - time("2022-04-01 11:00:00") :> 3600
meth (A: time) <> (B: time): integerCompares the times
AandBand returns-1,0or1respectively.meth (Time: time):day: integerReturns the date from
Timein local time.meth (Time: time):day(TimeZone: nil): integerReturns the date from
Timein UTC.meth (Time: time):day(TimeZone: time::zone): integerReturns the date from
TimeinTimeZone.meth (Time: time):epoch: integerReturns the seconds since the epoch.
meth (Time: time):epoch(Precision: integer): integerReturns the
round(Seconds since epoch x 10^Precision).meth (Time: time):hour: integerReturns the hour from
Timein local time.meth (Time: time):hour(TimeZone: nil): integerReturns the hour from
Timein UTC.meth (Time: time):hour(TimeZone: time::zone): integerReturns the hour from
TimeinTimeZone.meth (Time: time):minute: integerReturns the minute from
Timein local time.meth (Time: time):minute(TimeZone: nil): integerReturns the minute from
Timein UTC.meth (Time: time):minute(TimeZone: time::zone): integerReturns the minute from
TimeinTimeZone.meth (Time: time):month: integerReturns the month from
Timein local time.meth (Time: time):month(TimeZone: nil): integerReturns the month from
Timein UTC.meth (Time: time):month(TimeZone: time::zone): integerReturns the month from
TimeinTimeZone.meth (Time: time):nsec: integerReturns the nanoseconds component of
Time.meth (Arg₁: time):precision(Arg₂: integer)TBD
meth (Time: time):second: integerReturns the second from
Timein local time.meth (Time: time):second(TimeZone: nil): integerReturns the second from
Timein UTC.meth (Time: time):second(TimeZone: time::zone): integerReturns the second from
TimeinTimeZone.meth (Time: time):wday: integerReturns the day of the week from
Timein local time.meth (Time: time):wday(TimeZone: nil): integerReturns the day of the week from
Timein UTC.meth (Time: time):wday(TimeZone: time::zone): integerReturns the day of the week from
TimeinTimeZone.meth (Time: time):with(Component₁ is Value₁, ...): timeReturns
Timewith the the specified components updated.meth (Time: time):with(TimeZone: nil, Component₁ is Value₁, ...): timeReturns
Timewith the the specified components updated in UTC.meth (Time: time):with(TimeZone: time::zone, Component₁ is Value₁, ...): timeReturns
Timewith the the specified components updated in the specified time zone.meth (Time: time):yday: integerReturns the number of days from the start of the year from
Timein local time.meth (Time: time):yday(TimeZone: nil): integerReturns the number of days from the start of the year from
Timein UTC.meth (Time: time):yday(TimeZone: time::zone): integerReturns the number of days from the start of the year from
TimeinTimeZone.meth (Time: time):year: integerReturns the year from
Timein local time.meth (Time: time):year(TimeZone: nil): integerReturns the year from
Timein UTC.meth (Time: time):year(TimeZone: time::zone): integerReturns the year from
TimeinTimeZone.meth (Buffer: string::buffer):append(Time: time): stringFormats
Timeas a local time.meth (Buffer: string::buffer):append(Time: time, TimeZone: nil): stringFormats
Timeas a UTC time according to ISO 8601.meth (Buffer: string::buffer):append(Time: time, Format: string): stringFormats
Timeas a local time according to the specified format.meth (Buffer: string::buffer):append(Time: time, Format: string, TimeZone: nil): stringFormats
Timeas a UTC time according to the specified format.meth (Buffer: string::buffer):append(Time: time, Format: string, TimeZone: time::zone): stringFormats
Timeas a time inTimeZoneaccording to the specified format.meth (Buffer: string::buffer):append(Time: time, TimeZone: time::zone): stringFormats
Timeas a time inTimeZone.type time::day < enum::cyclic::Monday::Tuesday::Wednesday::Thursday::Friday::Saturday::Sunday
type time::month < enum::cyclic::January::February::March::April::May::June::July::August::September::October::November::December
type time::zoneA time zone.
meth (Buffer: string::buffer):append(TimeZone: time::zone)Appends the name of
TimeZonetoBuffer.meth (Name: time::zone::type) :: (Arg₂: string): time::zone | errorReturns the time zone identified by
Nameor an error if no time zone is found.