RE: [PHP-WIN] Help with Calendar Functions!!
| From: | Joey Garcia | Date: | Fri, 10 Nov 2000 17:23:44 +0000 |
| Subject: | RE: [PHP-WIN] Help with Calendar Functions!! | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-3784@lists.php.net to get a copy of this message | ||
I figured it was a BC date, but why that date? What is the coorelation
between -4713 and 2000? Would 2001 be -4712? What is the algorithm to
convert it or how do I use -4713, or whatever BC date, to get the current
year? What is funny is that how could it come back with a result of 10/28
(month/day) for Julian Day of 301 when it doesn't know the year? (Leap year
can throw that off)
I tried your example but that just gave me a result of "2451859", but no
matter what I do I can't get that to convert to the current year(2000).
Again, I don't know the correct algorithm, I get either 1999 or 2004
depending if I use 365 or 365.25.
Can you get a Julian day from a date using these functions?
Example,
For Date: 1/1/2000 the Julian Day: 1
For Date: 3/1/200 the Julian Day: 61
etc. ...
Again, I really appreciate your help!!!
-----Original Message-----
From: Zak Greant [mailto:zak@php.net]
Sent: Friday, November 10, 2000 10:00 AM
To: Joey Garcia
Cc: php-windows@lists.php.net
Subject: RE: [PHP-WIN] Help with Calendar Functions!!
At 09:48 AM 11/10/00 -0700, Joey Garcia wrote:
>Thanks for the insight to the Octal issue.
>
>What do I do with the -4713 number?
It indicates that the year is BC... or is this not your question...
>How do I get the Julian Day from 11/9/2000 using these functions? Does it
>not work with windows?
It works with windows.
list ($m, $d, $y) = explode ('/', date ('m/d/Y'));
$jd = gregoriantojd ($m, $d, $y);
--zak