You are here: Re: [PHP] Help with dates « PHP « IT news, forums, messages
Re: [PHP] Help with dates

Posted by Richard Lynch on 03/08/05 20:19

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация