Hi, I saw this question has been asked and was not answered.. maybe it's too elementary, but...
How do I break up the string that {$entry->formatpostdate} outputs into date, month, day, etc?
What I am after is formatting the entry post date into a "day-calendar" look of some blogs, like this:
http://louderthan10.com/
Any ideas, suggestions would be much appreciated...
News Module: parsing {$entry->formatpostdate} into separate outputs
Re: News Module: parsing {$entry->formatpostdate} into separate outputs
Have you tried something like this?
http://www.smarty.net/manual/en/languag ... format.php
Code: Select all
<span class="month">{$entry->formatpostdate|date_format: %b}</span><br />
<span class="day">{$entry->formatpostdate|date_format: %d}</span><br />
<span class="time">{$entry->formatpostdate|date_format: %H:%M}</span>
Re: News Module: parsing {$entry->formatpostdate} into separate outputs
Just found this post...
This works great when you add quotes to cyberman's code above:
{$entry->formatpostdate|date_format:"%b"}
{$entry->formatpostdate|date_format:"%d"}
{$entry->formatpostdate|date_format:"%H:%M"}
Otherwise you get errors.
c
This works great when you add quotes to cyberman's code above:
{$entry->formatpostdate|date_format:"%b"}
{$entry->formatpostdate|date_format:"%d"}
{$entry->formatpostdate|date_format:"%H:%M"}
Otherwise you get errors.
c