A86: Re: Josh: Calendar Functions
[Prev][Next][Index][Thread]
A86: Re: Josh: Calendar Functions
> Date: Mon, 5 Feb 2001 14:15:24 -0800
> From: rabidcow@juno.com
> Subject: Re: A86: Re: Calendar Formulas
>
> your routine seemed overly complicated so i wrote one off of my
> suggestion
> (beats doing calculus homework ;)
> not as easy as i had expected...
>
> this routine must base off of a leap year, so 1970 doesn't work.
> if you really want to base off of 1970, subtract 2*365 from hl
> before
> calling
> then base off of 1972 (add 2 to the year after return)
>
> also, this will be off by one day after feb 28, 2100
> inc hl before calling if >46810 to fix that (using 1972 as base
> year)
> or >42427 (using 1984 as base year)
>
nice code.
i decided to use a different approach: can the date index number.
it wasn't necessary. i am sticking with the mm/dd/yyyy.
using one byte for the month, one for the day, and two for the year.
month -> 1
day -> 1
year -> 2005
means: 1/1/2005. (just what it says)
this avoids the unecessary date index thing. i'm not sure why i did
that.
new problem: determining the day of the week from month, day, and year.
any suggestions? i know i can just look at others' source files on
previous calc programs. if i get desperate.
jimi malcolm
mailto:malcolmj1@juno.com
http://guide.ticalc.org
________________________________________________________________
GET INTERNET ACCESS FROM JUNO!
Juno offers FREE or PREMIUM Internet access for less!
Join Juno today! For your FREE software, visit:
http://dl.www.juno.com/get/tagj.