|
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 |
gerard Smarty Regular
Joined: 18 Apr 2003 Posts: 84
|
Posted: Sat Jul 03, 2004 7:18 am Post subject: date_format and dates before 1970 |
|
|
I've tried this on both Windows and Linux - using Smarty 2.6.3. In the template:
Code: | {assign var="d1" value="1911-05-24"}
{assign var="d2" value="1921-05-24"}
{assign var="d3" value="1931-05-24"}
{assign var="d4" value="1941-05-24"}
{assign var="d5" value="1951-05-24"}
{assign var="d6" value="1961-05-24"}
{assign var="d7" value="1971-05-24"}
{assign var="d8" value="1981-05-24"}
{$d1|date_format:"%B %e, %Y"}<br>
{$d2|date_format:"%B %e, %Y"}<br>
{$d3|date_format:"%B %e, %Y"}<br>
{$d4|date_format:"%B %e, %Y"}<br>
{$d5|date_format:"%B %e, %Y"}<br>
{$d6|date_format:"%B %e, %Y"}<br>
{$d7|date_format:"%B %e, %Y"}<br>
{$d8|date_format:"%B %e, %Y"}<br>
|
The output:
Code: | December 31, 1969
December 31, 1969
December 31, 1969
December 31, 1969
December 31, 1969
December 31, 1969
May 24, 1971
May 24, 1981 |
Know what the problem is? |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Sat Jul 03, 2004 9:37 am Post subject: |
|
|
the problem is that date_format uses php's strftime which is limited and system-dependant. |
|
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
|