Re: Help with dates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Kevin wrote:
> 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.

[shudder]
There are already WAY too many calendar systems.

Inventing a new one is probably not such a good plan...

Why re-invent the wheel?

> In order to do that I need to find the exact days since the year 0 BC/AD.
> However, the functions php provides only allow up to the unix epoch.
>
> Could you guys give me some pointers on how to accomplish this,
> accurately?

Take a look at the MySQL date ranges -- They may have a data type that
allows for more than just 1/1/1970 to 3/??/2038

If not, consider using PostgreSQL which has VERY extensive and flexible
date support, for ranges MUCH larger than 0 BC/AD.
http://postgresql.org

I believe PostgreSQL even supports time scales on the order of geological
events and for astronomical purposes, though not with "day" accuracy.

I am assuming that by "accurately" you mean "to the nearest day" since you
spoke of "exact days", right?

But you didn't define how far into the future you need to go.
Current time?
A few years out?
Stardates from Star Trek?
You have to specify a start date, end date, and accuracy to choose a
correct calendar system.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux