Expand description
Today’s date and the time of day, in the user’s time zone.
The Host reads them itself, so nothing about them crosses the boundary. On desktop, iOS
and Android the C library converts an instant with the time zone the operating system
is set to; a TZ in the environment wins, as it does for every program on those
systems. In a browser the page’s Date answers, which is the browser’s time zone.
subscribe_date_change wakes a reader once when the date changes: at local midnight,
or when the user moves to a time zone where it is already another day.
Structs§
- Date
Change Subscription - A registration for date changes. Dropping it ends the registration.
- Local
Date - A date on the calendar of the user’s time zone.
- Local
Date Time - A moment as the clock on the user’s wall shows it.
Enums§
- Weekday
- A day of the week.
Functions§
- local_
at - What the wall clock in the user’s time zone showed, or will show, at
instant. - now_
local - The current date and time of day in the user’s time zone.
- subscribe_
date_ change - Registers
notifyto be called once each time the date in the user’s time zone changes: when local midnight passes, or when the user moves to a time zone where it is another day. Called on a Host worker thread, or in a browser at the start of a frame, so it does what any worker does with a change: update a signal, which asks for a frame. - today
- Today’s date in the user’s time zone.