![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I wonder if the Pick (or at least UniData) ICONV function correctly calculates leap years in antiquity. Running the following program on UniData 6.0 gives an interesting result. FOR Y = 1 TO 12000 LY1 = (ICONV('3-1-':Y,'D') - ICONV('2-28-':Y,'D')) - 1 LY2 = (REM(Y,4)=0) AND ((REM(Y,100)#0) OR (REM(Y,400)=0)) |
|
IF LY1 # LY2 THEN CRT Y:' ':LY1:' ':LY2 NEXT Y The result is interesting in that it is not null; it indicates that UniData thinks the years 200 and 600 are leap years, but thinks that neither 400 nor 800 are leap years. 200 1 0 400 0 1 600 1 0 800 0 1 Comments? Regards, |
#3
| |||
| |||
|
#4
| |||
| |||
|
|
I wonder if the Pick (or at least UniData) ICONV function correctly calculates leap years in antiquity. Running the following program on UniData 6.0 gives an interesting result. FOR Y = 1 TO 12000 LY1 = (ICONV('3-1-':Y,'D') - ICONV('2-28-':Y,'D')) - 1 LY2 = (REM(Y,4)=0) AND ((REM(Y,100)#0) OR (REM(Y,400)=0)) IF LY1 # LY2 THEN CRT Y:' ':LY1:' ':LY2 NEXT Y The result is interesting in that it is not null; it indicates that UniData thinks the years 200 and 600 are leap years, but thinks that neither 400 nor 800 are leap years. 200 1 0 400 0 1 600 1 0 800 0 1 Comments? -- frosty |
#5
| |||
| |||
|
|
I wonder if the Pick (or at least UniData) ICONV function correctly calculates leap years in antiquity. Running the following program on UniData 6.0 gives an interesting result. FOR Y = 1 TO 12000 LY1 = (ICONV('3-1-':Y,'D') - ICONV('2-28-':Y,'D')) - 1 LY2 = (REM(Y,4)=0) AND ((REM(Y,100)#0) OR (REM(Y,400)=0)) IF LY1 # LY2 THEN CRT Y:' ':LY1:' ':LY2 NEXT Y The result is interesting in that it is not null; it indicates that UniData thinks the years 200 and 600 are leap years, but thinks that neither 400 nor 800 are leap years. 200 1 0 400 0 1 600 1 0 800 0 1 Comments? -- frosty |
#6
| |||
| |||
|
|
frosty wrote: I wonder if the Pick (or at least UniData) ICONV function correctly calculates leap years in antiquity. Running the following program on UniData 6.0 gives an interesting result. FOR Y = 1 TO 12000 LY1 = (ICONV('3-1-':Y,'D') - ICONV('2-28-':Y,'D')) - 1 LY2 = (REM(Y,4)=0) AND ((REM(Y,100)#0) OR (REM(Y,400)=0)) IF LY1 # LY2 THEN CRT Y:' ':LY1:' ':LY2 NEXT Y The result is interesting in that it is not null; it indicates that UniData thinks the years 200 and 600 are leap years, but thinks that neither 400 nor 800 are leap years. 200 1 0 400 0 1 600 1 0 800 0 1 Comments? -- frosty The rules for determining leap years are actually - Once every 4 years Except every 100 years Except every 400 years So UNIDATA have it right.. We used to use it as a 'how many lines of code do you need to determine a leap year' in Databasic ( 1 as it happens ) Regards Godric |
#7
| |||
| |||
|
|
The rules for determining leap years are actually - Once every 4 years Except every 100 years Except every 400 years So UNIDATA have it right.. We used to use it as a 'how many lines of code do you need to determine a leap year' in Databasic ( 1 as it happens ) |
#8
| |||
| |||
|
|
frosty wrote: I wonder if the Pick (or at least UniData) ICONV function correctly calculates leap years in antiquity. Running the following program on UniData 6.0 gives an interesting result. FOR Y = 1 TO 12000 LY1 = (ICONV('3-1-':Y,'D') - ICONV('2-28-':Y,'D')) - 1 LY2 = (REM(Y,4)=0) AND ((REM(Y,100)#0) OR (REM(Y,400)=0)) IF LY1 # LY2 THEN CRT Y:' ':LY1:' ':LY2 NEXT Y The result is interesting in that it is not null; it indicates that UniData thinks the years 200 and 600 are leap years, but thinks that neither 400 nor 800 are leap years. 200 1 0 400 0 1 600 1 0 800 0 1 Comments? -- frosty The rules for determining leap years are actually - Once every 4 years Except every 100 years Except every 400 years |
|
So UNIDATA have it right.. |
|
We used to use it as a 'how many lines of code do you need to determine a leap year' in Databasic ( 1 as it happens ) Regards Godric |
#9
| |||
| |||
|
|
godric (AT) trapezesoftware (DOT) com> wrote in message news:1128678267.914647.31120 (AT) o13g2000cwo (DOT) googlegroups.com... frosty wrote: I wonder if the Pick (or at least UniData) ICONV function correctly calculates leap years in antiquity. Running the following program on UniData 6.0 gives an interesting result. FOR Y = 1 TO 12000 LY1 = (ICONV('3-1-':Y,'D') - ICONV('2-28-':Y,'D')) - 1 LY2 = (REM(Y,4)=0) AND ((REM(Y,100)#0) OR (REM(Y,400)=0)) IF LY1 # LY2 THEN CRT Y:' ':LY1:' ':LY2 NEXT Y The result is interesting in that it is not null; it indicates that UniData thinks the years 200 and 600 are leap years, but thinks that neither 400 nor 800 are leap years. 200 1 0 400 0 1 600 1 0 800 0 1 Comments? -- frosty The rules for determining leap years are actually - Once every 4 years Except every 100 years Except every 400 years So UNIDATA have it right.. We used to use it as a 'how many lines of code do you need to determine a leap year' in Databasic ( 1 as it happens ) Regards Godric |
#10
| |||
| |||
|
|
Mark Brown wrote: Mark... do you have something to add? =`:^ I'm hoping you agree with me on this; seems nobody else does. |
![]() |
| Thread Tools | |
| Display Modes | |
| |