Re: Freemarker Date Format issue

Daniel Dekany <[email protected]> Mon, 2 Mar 2015 23:21:15 +0100
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
Monday, March 2, 2015, 10:55:12 PM, FOX427 wrote:

> Thank you Daniel! i will definitely use your advice! One question though,
> what is EEE?

Um... right, one E is enough, and for parting it works both for Mon
and Monday. See:
http://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html

"For formatting, if the number of pattern letters is 4 or more, the
full form is used; otherwise a short or abbreviated form is used if
available. For parsing, both forms are accepted, independent of the
number of pattern letters."

I have learnt something today too... (:

> I know that I will get "Mon" in my case and if i use EEEEEE I
> will get "Monday",

Or if you use EEEE.

> so does that mean I can use E value for each character that I don't
> need to use but have to declare so freemarker won't complain?

FreeMarker has no idea what those E-s mean. As the Manual says, it's
just Java's standard SimpleDateFormat. If SimpleDateFormat throws
exception, FreeMarker will complain.

> Overall,  I like your response because i am learning new stuff here. Also, I
> still don't know how to change Mar to March, I could use if/elseif
> statements and assign full month names to short three letter month names but
> I think there are better ways to do it. Anyway, thanks for your help again.
>
>
>
> --
> View this message in context:
> http://freemarker.624813.n4.nabble.com/Freemarker-Date-Format-issue-tp4655381p4655384.html
> Sent from the freemarker-user mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website, sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for all
> things parallel software development, from weekly thought leadership blogs to
> news, videos, case studies, tutorials and more. Take a look and join the
> conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> FreeMarker-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/freemarker-user
>

-- 
Thanks,
 Daniel Dekany


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/