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

[REBOL] Re: [REBOL]

From: allen:rebolforces at: 26-Oct-2000 2:12

The date datetype is extremely flexible and does most of the work needed for making a calendar. **The only gotcha is the month subtraction bug.** Month Addition date: now date/month: date/month + 24 probe date 26-Oct-2002/1:53:07+10:00 Month Subtraction returns an incorrect date if the result would be a date earlier than January. :-( date: now date/month: date/month - 24 probe date 26-Feb-23844/1:53:55+10:00 (submitted to feedback) Subtraction via day does not have that problem date: now date/day: date/day - 365 probe date 27-Oct-1999/2:04:31+10:00 To get first day of the month date: now date/day: 1 probe date 1-Oct-2000/2:00:17+10:00 probe date/weekday 7 To get the last day of the month date: now date/month: date/month + 1 date/day: 1 date/day: date/day - 1 probe date 31-Oct-2000/2:06:32+10:00 probe date/weekday 2 Hope this helps Cheers, Allen K