|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
Alex94 Smarty n00b
Joined: 18 Oct 2003 Posts: 1
|
Posted: Sat Oct 18, 2003 9:17 am Post subject: problem with date_format |
|
|
Hello,
On FreeBSD, I have a strange problem with date_format modifier ...
{"1975-09-29"|date_format:"%d-%m-%Y"} returns "29-09-1975"
while
{"1969-09-29"|date_format:"%d-%m-%Y"} returns nothing ...
I'm using the modifier on birthdates and all users older than 30 years old don't see their birthdate displayed.
Is it a "bug" or something more related to UNIX timestamps ?
Isn't possible to manipulate dates before the 70's ?
Thanks ! |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Sat Oct 18, 2003 9:39 pm Post subject: |
|
|
date_format uses strftime, so unix timestamp limitations apply. If you want to handle dates outside that rage, look up Date_Calc in the PEAR repository and make a smarty function that uses it. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|