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

[REBOL] Re: One-Liners

From: Al:Bri:xtra at: 18-Apr-2003 8:35

Hugues wrote:
> I was reading the One-Liners page in RebolTech web Site, and I've just a
very little remark on a script on Andrew. In fact year 2000 is not a leapyear, because all years that multiply 400 are not leapyear, in order to approach to the real number of days (365,2422) in a year. With this system, it's approached to 365,2425 My Windows XP clock calendar indicates that year 2000 has 29 days in February. This means that 2000 IS a leap year.
>> leapyear? 1/1/2000
== true Leapyear?: function [ "Returns true for a leap year." Date [date!] "The date to check." ] [Year] [ Year: Date/year any [ all [ 0 = remainder Year 4 0 <> remainder Year 100 ] 0 = remainder Year 400 ] ]
>> 29/2/2000
== 29-Feb-2000
>> 30/2/2000
** Syntax Error: Invalid date -- 30/2/2000 ** Near: (line 1) 30/2/2000
>> 28/2/2000
== 28-Feb-2000 Rebol also agrees that there is 29 days in February, 2000. Any other opinions? Andrew Martin ICQ: 26227169 http://valley.150m.com/