def when.time.only

emerging-eztoml@0.9.0.0 · main.bend:1014

import emerging-eztoml@0.9.0.0/main.bend as EmergingEztoml
import Base

1014# a local time uses a dummy date and then keeps only the clock
1015def when.time.only(ww: WhenOut) -> WhenOut:
1016  match ww:
1017    case WSome{WLocal{_date, clock}}:
1018      WSome{WTime{clock}}
1019    case WSome{WOff{_date, clock, zone}}:
1020      WFail{"invalid time"}
1021    case WSome{other}:
1022      WFail{"invalid time"}
1023    case WFail{why}:
1024      WFail{why}
1025    case WSkip{}:
1026      WFail{"invalid time"}

Uses (2)

Used by (1)