Ok I think this is a really silly problem... Is there a way to add 1 month minus 1 day to a given date? With the exceptions below:

Let d m and y be the day month and year respectively.

Is there a simpler way to do this? Or perhaps some built in function?

Let d m and y be the day month and year respectively.

Code:

new_m = m+1 new_d = d-1 'EXCEPTIONS: if m = 12 then new_m = 1 and new_y = y + 1 if d = 1 then new_d = 31 if m = 4,6,9,11 then new_d = 30 if m = 2 and y mod 4 = 0 then new_d = 29 if m = 2 and y mod 4 <> 0 then new_d = 28 end if if d = 31 then new_d = 30 if m = 4,6,9,11 then new_d = 29 'etc etc 'then new_d is 28 and 27 for february, and then i have to make exceptino cases for when d is 28 29 30 as well...

## Comment