Re: Help with dates
| From: | Jason Barnett | Date: | Sun, 06 Mar 2005 20:42:30 +0000 |
| Subject: | Re: Help with dates | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-210113@lists.php.net to get a copy of this message | ||
Kevin wrote:
> Hi there,
>
> I seem to be in a bit of a pickle.
>
> Right now I'm working on a script that would calculate dates from one
> calendar to another. The normal calendar we use and a newly invented one.
>
> In order to do that I need to find the exact days since the year 0 BC/AD.
Do you really need this? I.e. is this a linear / quadratic / etc.
fucntion... one where you can start with one known value (Jan. 1 1970)
and build all dates relative to this date instead?
If you just want days since 0 BC / AD you can recreate all of the PHP
date functions yourself... but use a "daystamp" from 0 BC/AD instead of
a "timestamp" from 1970. Or fudge things a little and use 365.25 days
per year...
--
Teach a man to fish...
NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-general&w=2
STFM | http://php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php
LAZY |
http://mycroft.mozdev.org/download.html?name=PHP&submitform=Find+search+plugins
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc