def time.jan1
import ezsys@0.1.0.0/src/clock.bend as Clockimport Base
313# the day number of 1 January of a year from 1970 on: Howard Hinnant's
314# days_from_civil for month 1, day 1
315def time.jan1(year: U32) -> U32:
316 +yr = (year - 1 : U32)
317 +era = (yr / 400 : U32)
318 +yoe = (yr - era * 400 : U32)
319 (era * 146097 + yoe * 365 + yoe / 4 - yoe / 100 + 306 - 719468 : U32)