///|
/// A local civil-time snapshot supplied by a platform host.
///
/// `weekday` follows the host calendar convention: Sunday is `0` and Saturday
/// is `6`. It is an instantaneous value rather than a timer; applications that
/// need updates should pair it with an app-facing `@services.TimerSource`
/// subscription supplied by the composition root.
#derive(Eq, Debug, ToJson)
pub(all) struct HostWallClock {
year : Int32
month : Int32
day : Int32
weekday : Int32
hour : Int32
minute : Int32
second : Int32
}
///|
pub extend HostWallClock with Debug::{to_repr}
///|
pub extend HostWallClock with Eq::{not_equal, equal}
///|
pub extend HostWallClock with ToJson::{to_json}
///|
pub fn HostWallClock::new(
year : Int32,
month : Int32,
day : Int32,
weekday : Int32,
hour : Int32,
minute : Int32,
second~ : Int32 = 0,
) -> HostWallClock {
{ year, month, day, weekday, hour, minute, second, }
}