Clock.time.week.of: def of ezsys@0.1.0.0 Import: import ezsys@0.1.0.0/src/clock.bend as Clock Lines 325-330 of ezsys@0.1.0.0/src/clock.bend: https://jend.leeeet.dev/read.txt?path=ezsys@0.1.0.0/src/clock.bend&start_line=325&end_line=330 import Base # the ISO year and week of a week's Thursday: the Thursday's calendar year, # and how many Thursdays of that year it is def time.week.of(+thu: U32, date: Ymd) -> U32 & U32: match date: case Ymd{+year, _month, _day}: (year, ((thu - time.jan1(year)) / 7 + 1 : U32)) Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.div https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.sub https://jend.leeeet.dev/definition.txt?path=ezsys@0.1.0.0/src/clock.bend&name=Ymd https://jend.leeeet.dev/definition.txt?path=ezsys@0.1.0.0/src/clock.bend&name=time.jan1