time
time copied to clipboard
Better support for weeks
Desired functionality:
- given a
Fixed<LTOEDay>
, get the week (Array<Fixed<Day>>
) that contains it - given a
Fixed<GTOEMonth>
, get an array of weeks in it, with an option to pad out week arrays so they're all 7 days - get the last day of a week
Thinking about this some more, I think I could get away with an actual Week
unit type; it would be GTOEDay
and LTOEMonth
. It would require significant verification that the current generic extensions to Fixed<Unit>
apply correctly.
However, it would mean that it should get most functionality "for free".