There should be convenience functions for the last days of the year (either the 365th or 366th day depending on whether it is a leap year) and the last day of the month (varying according to the month and wether it is a leap year for February).
Along with making these common patterns easier for users, this would also be computationally more efficient.