Re: Formatting a date from a Twitter feed?

Daniel Dekany <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
Monday, August 16, 2010, 8:39:10 PM, rottinam wrote:

>
> Hi,
>
> I am trying to format a date from a twitter RSS feed. The node in question
> looks like this:
>
> <published>2010-08-10T17:29:29+01:00</published>
>
> Any ideas how to make this look human readable, specifically like:
> August 10, 2009 5:25 pm

First you have to convert that string to a date with
http://freemarker.org/docs/ref_builtins_string.html#ref_builtin_string_date,
then you have to convert it back to string with
http://freemarker.org/docs/ref_builtins_date.html#ref_builtin_string_for_date

> I have read up on the date directives but these aren't working. :/

Perhaps you misunderstand how to use them.

-- 
Best regards,
 Daniel Dekany


------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.