Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Altering dates

 [1/2] from: carl::cybercraft::co::nz at: 24-Dec-2003 22:22


Is it safe to just give a date's year a new value (like I have below), or should you make a new date? (February 29th won't crop up with what I'm doing.) The weekday is right after the change (as shown below), but are there any other issues?
>> date: now/date
== 4-Jul-2003
>> date/weekday
== 5
>> date/year: 2002
== 2002
>> date
== 4-Jul-2002
>> date/weekday
== 4 -- Carl Read

 [2/2] from: g:santilli:tiscalinet:it at: 4-Jul-2003 10:17


Hi Carl, On Friday, July 4, 2003, 8:24:56 AM, you wrote: CR> Is it safe to just give a date's year a new value Yes it is. REBOL takes care of ensuring that the resulting date makes sense.
>> d: 29-feb-2000
== 29-Feb-2000
>> d/year: 2001
== 2001
>> d
== 1-Mar-2001 Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r