in reply to Given month last day

Using any time-calculation package you please: take the month and year, and calculate the first day of that month/year (month/01/year). Add one month. Then, subtract one day.