Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
Dedicated server web hosting provided by Guru-host.eu.
problem with date_format

 
Post new topic   Reply to topic    Smarty Forum Index -> Bugs
View previous topic :: View next topic  
Author Message
Alex94
Smarty n00b


Joined: 18 Oct 2003
Posts: 1

PostPosted: Sat Oct 18, 2003 9:17 am    Post subject: problem with date_format Reply with quote

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
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7036
Location: Lincoln Nebraska, USA

PostPosted: Sat Oct 18, 2003 9:39 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Bugs All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP