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

One-Liners

 [1/5] from: hugues::moisy::geosignal::fr at: 17-Apr-2003 19:15


Hi, 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 Just a remark Regards Hugues

 [2/5] 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/

 [3/5] from: bga:bug-br at: 17-Apr-2003 18:00


In Fri, 18 Apr 2003 08:35:12 +1200, Andrew Martin said:
> Hugues wrote: > > I was reading the One-Liners page in RebolTech web Site, and I've
<<quoted lines omitted: 7>>
> My Windows XP clock calendar indicates that year 2000 has 29 days in > February. This means that 2000 IS a leap year.
2000 was supposed to be a leap year because it is a multiple of four. But, then, it was not supposed to be a leap year because it is a multiple of 100. And, finally, it *WAS* a leap yar because it is a multiple of 400. In other words: If you can divide the year by 4, it is a leap year unless you can also divide it by 100, in which case it is not a leap year, unless, again., you can divide it by 400, in which case it is a leap year. Pretty easy, no=3F ;) -Bruno -- Fortune Cookie Says: Rules for Academic Deans: (1) HIDE!!!! (2) If they find you, LIE!!!! -- Father Damian C. Fandal

 [4/5] from: greggirwin:mindspring at: 17-Apr-2003 15:52


Hi Hugues, HM> I was reading the One-Liners page in RebolTech web Site, and I've just a HM> very little remark on a script on Andrew. HM> In fact year 2000 is not a leapyear, because all years that multiply 400 are HM> not leapyear, in order to approach to the real number of days (365,2422) in HM> a year. With this system, it's approached to 365,2425 To back up Andrew's response, here are the general/common rules I know of: 1) If the year is divisible by 4, itís a leap year. 2) Butóif the year is also divisible by 100, itís not a leap year. 3) Double butóif the year is also divisible by 400, it is a leap year. So 2000 is a leap year according to those. Now, there is more than one calendaring system in the world, so... -- Gregg

 [5/5] from: hugues:moisy:geosignal at: 18-Apr-2003 9:26


Sorry Andrew, I did a mistake.

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted