EASY way to add n days to a date?

Medard liste.revo at medard.on-rev.com
Sun Dec 20 05:41:50 EST 2009


zryip theSlug <zryip.theslug at gmail.com> wrote:

> An easy trick to know the end date of one month without creating
> complex script to test the number of days in the months, years
> leap, etc..

clever -- but that doesn't work on "foreign" systems
i.e. non english languages ;-)

it is still funny to see Revolution to declare some parameter to be "not
a date" as you prior performed a "put the system" date into fld "xxx"
;->

so, the starting date MUST be an "english" one, I mean a "US" date,
according to the yyyy/dd/mm scheme

my "system date" is yyyy-mm-dd 
(avoiding the slash, used in Unix as file/folder delimitor)

Anyway, after sticking to those caveats, the provided code gives exactly
what it is intended for, i.e. the date a month minus a day ahead -- not
the end of the month ;-)) 





More information about the use-livecode mailing list