Reply to Re: Dates before 1969

Your name:

Reply:


Posted by Gordon Burditt on 10/09/64 11:36

>I have written a program that uses the built-in PHP date functions.
>All that the program does is calculate the amout of time between two
>dates, or calculate the date a certain amount of time before or after
>another date. It works, but I didn't realize until after I finished it
>that it won't work for dates outside the range of 1969-2033. I need it

You might consider using MySQL's date functions. The MySQL date
type will handle dates between 0 and 9999 (Y10K bug alert!).

>to work for any date going back to the 1500s for pairs of dates that
>are up to about 400 years apart. Is there any way that I can fix my
>program without having to start over writing my own date functions? My
>program uses the strtotime() and date() functions.

MySQL also has date_format and str_to_date.

I am not sure what calendar is used for datediff(), as gaps in
the calendar and other strangeness like variations in the beginning
day of the year will also affect the results.

Gordon L. Burditt

[Back to original 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

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