# dates.month-boundaries Returns start, end and days together because callers need them together: a billing period, a statement range, a pro-rata fraction whose denominator is the length of the month. Handing back only the start and letting the caller derive the end is how "31 January plus one month" becomes 3 March. "end" is the last day of the month, inclusive - 2024-02-29, not 2024-03-01. Inclusive is what a statement prints and what a human checks the figures against. Callers doing half-open range comparisons should add a day with dates.add-days rather than expecting this to hand back the 1st of the next month. February is the only month whose length is not a constant, and it follows the full Gregorian rule rather than year % 4: 2024 had 29 days, 1900 had 28 because a century year is skipped, 2000 had 29 because every 400th is not. Those three cases are in the vectors precisely because the shortcut rule gets two of them wrong, and 1900 is still inside the range of real data - pension and land records reach back that far.