Re: RSS-Feed processing
Felix Delattre <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.template-toolkit |
|---|---|
| Message-ID | <[email protected]> |
On 03/04/2012 06:52 PM, Michael Ludwig wrote: > Felix Delattre schrieb am 04.03.2012 um 18:33 (-0600): > >> Another quick question: Is there a way to format [% item.pubDate %] >> to another date format? > Take a look at this page: > > http://template-toolkit.org/docs/modules/Template/Plugin/Date.html > > [% USE date(format = '%A %d. %B %Y', locale = 'de_DE') %] > [% date.format %] > > However, in order to use this, you must first parse the string > item.pubDate into a time(), which you can do using POSIX::mktime. Thank you. Michael! It worked fine this way: [% USE date %] [% manip = date.manip %] [% manip.UnixDate(item.pubDate,"%d-%m-%Y") %] Cheers, Felix