dbTalk Databases Forums  

A long time ago, in a century far away...

comp.databases.pick comp.databases.pick


Discuss A long time ago, in a century far away... in the comp.databases.pick forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
frosty
 
Posts: n/a

Default A long time ago, in a century far away... - 10-05-2005 , 05:07 PM






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



Reply With Quote
  #2  
Old   
Bruce Nichol
 
Posts: n/a

Default Re: A long time ago, in a century far away... - 10-05-2005 , 06:24 PM






Goo'day,

Found your treatise amongst all the tripe.... Wish he'd stay off
whatever he's on..... or at least lose the cdp address...... The early
Greeks and Romans (and a few others since then) had the right
idea......

Go, Genghis!

On Wed, 5 Oct 2005 15:07:23 -0700, "frosty" <frostyj (AT) bogus (DOT) tld> wrote:

Quote:
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))
Should LY2 really have the bit about divisible by "100"???? Isn't it
only 4 and 400???

Somewhere in the fog.....


Quote:
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,

Bruce Nichol
Talon Computer Services
ALBURY NSW Australia

http://www.taloncs.com.au

If it ain't broke, fix it until it is....


Reply With Quote
  #3  
Old   
qbits killed the cat
 
Posts: n/a

Default Re: A long time ago, in a century far away... - 10-05-2005 , 06:29 PM



Goo'day,


Found your treatise amongst all the tripe.... Wish he'd stay off
whatever he's on..... or at least lose the cdp address...... The early
Greeks and Romans (and a few others since then) had the right
idea......


(yawn)


Reply With Quote
  #4  
Old   
murthi
 
Posts: n/a

Default Re: A long time ago, in a century far away... - 10-06-2005 , 02:10 PM



uv 10.x:
100 1 0
200 1 0
300 1 0
500 1 0
600 1 0
700 1 0
900 1 0
1000 1 0
1100 1 0
1300 1 0
1400 1 0
1500 1 0
Chandru
"frosty" <frostyj (AT) bogus (DOT) tld> wrote

Quote:
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




Reply With Quote
  #5  
Old   
godric@trapezesoftware.com
 
Posts: n/a

Default Re: A long time ago, in a century far away... - 10-07-2005 , 04:44 AM




frosty wrote:
Quote:
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



Reply With Quote
  #6  
Old   
Mark Brown
 
Posts: n/a

Default Re: A long time ago, in a century far away... - 10-07-2005 , 04:46 AM




<godric (AT) trapezesoftware (DOT) com> wrote

Quote:
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




Reply With Quote
  #7  
Old   
rog
 
Posts: n/a

Default Re: A long time ago, in a century far away... - 10-07-2005 , 08:13 AM



<godric (AT) trapezesoftware (DOT) com> wrote


Quote:
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 )
Unidata is right. But since Feb 29,2000 existed. I did a little
research.

http://h71000.www7.hp.com/openvms/pr...2000/leap.html

Rule is once every 4 years except in years that are not divisible by
400.


rog





Reply With Quote
  #8  
Old   
frosty
 
Posts: n/a

Default Re: A long time ago, in a century far away... - 10-07-2005 , 07:11 PM



godric (AT) trapezesoftware (DOT) com wrote:
Quote:
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 400 and 800 should be leap years; UniData thinks they are not.
Also, 200 and 600, which are divisible by 100 but not by 400,
should not be leap years; UniData thinks they are.

Quote:
So UNIDATA have it right..
I would disagree.

Quote:
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



Reply With Quote
  #9  
Old   
frosty
 
Posts: n/a

Default Re: A long time ago, in a century far away... - 10-07-2005 , 07:13 PM



Mark Brown wrote:

Mark... do you have something to add? =`:^>

I'm hoping you agree with me on this; seems nobody else does.

--
frosty

Quote:
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



Reply With Quote
  #10  
Old   
Luke Webber
 
Posts: n/a

Default Re: A long time ago, in a century far away... - 10-07-2005 , 08:42 PM



frosty wrote:
Quote:
Mark Brown wrote:

Mark... do you have something to add? =`:^

I'm hoping you agree with me on this; seems nobody else does.
I'm with you on this, John. UDT is FUBAR.

Luke


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.