| |
It's often necessary to find the last day of
the month. The basic logic is to pick a day on the middle of
the month, add 20 days to it (so you're in the next month),
set that month to the first day, and subtract one. Now
you've got the last day of this month, regardless of year,
month, or leap year. |