Returns 31 December of the validated date's year.
Signature
last_of_year :: (value: Date) -> Date
A Date is a whole day, so the end of a period is its last day, inclusive, like
last_of_month. For an exclusive bound, add one day. For a Zoned value, pass the
local date: to_civil(value.zone, value.timestamp).date.
d := last_of_year(Date.{ 2024, 3, 15 });
assert(d.month == 12 && d.day == 31);