RE : [SMARTY] Dates prior to 1970
| From: | Christopher Rousseau | Date: | Tue, 29 Apr 2003 13:56:12 +0000 |
| Subject: | RE : [SMARTY] Dates prior to 1970 | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-9421@lists.php.net to get a copy of this message | ||
Php use timestamp to store date.
That's mean "number of seconde since 01/01/1970"
The aged date is then 01/01/1970 00:00:00
And because timestamp is a 32bit Integer (at least under windows, and
many unix) you also have a max limite (somewhere near 2038 If I
remember).
If the date come from a database, I would suggest to format it directly
in you database (the easy-lazy way).
If you must manipulate your date, I would suggest to use the PEAR::Date
class. Our internationaly knowed 'Monte Ohrt' is maintainer of it, so it
must be ok to use it ;).
PEAR is final and is deliver with php 4.3.x
It's a set of usefull class
http://pear.php.net
-----Message d'origine-----
De : Joel Lord [mailto:joellord@stratagem-mgnt.com]
Envoyé : mardi 29 avril 2003 14:22
À : 'Smarty General'
Objet : [SMARTY] Dates prior to 1970
Hi,
I use the date_format modifier for my dates but since one of my fields
is < Date of Birth >, many dates are prior to 1970 and will display as
December 31st 1969. Is there any way to format dates prior to 1970 ?
Thanks for your help,
Joel Lord