def time.fields.of

ezsys@0.1.0.0 · src/clock.bend:350

import ezsys@0.1.0.0/src/clock.bend as Clock
import Base

350# a date, a second of the day and a weekday as the civil fields
351def time.fields.of(
352  date: Ymd,
353  +sod: U32,
354  wd: U32
355) -> U32 & U32 & U32 & U32 & U32 & U32 & U32:
356  match date:
357    case Ymd{year, month, day}:
358      (year, month, day, (sod / 3600 : U32), (sod % 3600 / 60 : U32),
359        (sod % 60 : U32), wd)

Uses (6)

Used by (1)