def civil.adj

cswap-bend-cli@0.1.0.0 · clock.bend:38

import cswap-bend-cli@0.1.0.0/clock.bend as Clock
import Base

38# Civil date (year, (month, day)) of a day count since 1970-01-01
39# (Hinnant's civil_from_days, all unsigned: z + 719468 is positive).
40def civil.adj(+y: U32, +m: U32, d: U32) -> U32 & (U32 & U32):
41  (sel(U32.is_le(m, 2), (y + 1 : U32), y), (m, d))

Uses (6)

Used by (1)