[MGNLSTK-738] Content date format does not change under en_US locale Created: 26/Jan/11  Updated: 19/Apr/11  Resolved: 04/Feb/11

Status: Closed
Project: Magnolia Standard Templating Kit (closed)
Component/s: templates
Affects Version/s: None
Fix Version/s: 1.4.3

Type: Improvement Priority: Neutral
Reporter: Mina Labib [X] (Inactive) Assignee: Ondrej Chytil
Resolution: Fixed Votes: 0
Labels: culture, date, date_format, datecontrol
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Magnolia EE 4.1.1
Windows
(IE, Chrome, Firefox)


Template:
Acceptance criteria:
Empty
Date of First Response:

 Description   

When I use news template in the STK and added a new page and assigned a date to the page it appears in the following format (dd.MM.yy) even under en_US locale.
I am expecting the following format (MM.dd.yy).



 Comments   
Comment by Philipp Bärfuss [ 27/Jan/11 ]

You are right, while this works in the events/news overview as expected it doesn't in the news page's header because the format is hardcoded in mainAreaIntro.ftl.

[#if hasDate]
    <li class="date">${date?string("dd.MM.yyyy")}</li>
[/#if]

But it should be something along the lines: ${date?date?string.medium}

Generated at Mon Feb 12 07:29:56 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.