fn daysInYear(year: u16, max_month: u4) u9 year: u16max_month: u4180
181
182
183
184
185
186
187 fn daysInYear(year: u16, max_month: u4) u9 {
var days: u9 = 0;
var month: u4 = 0;
while (month < max_month) : (month += 1) {
days += std.time.epoch.getDaysInMonth(year, @fromBackingInt(@intCast(month + 1)));
}
return days;
}