freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Dekany (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FREEMARKER-95) Wrong day of the week shown for the Thai locale
Date Thu, 26 Apr 2018 18:50:00 GMT

    [ https://issues.apache.org/jira/browse/FREEMARKER-95?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16454687#comment-16454687
] 

Daniel Dekany commented on FREEMARKER-95:
-----------------------------------------

I don't follow... why would it refer to 1475? I mean, I see that there's a 543 difference
in year between the Gregorian and Buddhist calendar, I just don't see how could that cause
confusion for FreeMarker. What exactly is in {{payload.bookingDate}} (type and value)?

Especially as this:

{code}
<#setting locale='th_TH'>
<#setting timeZone='GMT+7'> <#-- or GMT+0, doesn't mater as we have T12:00Z -->
${'2018-04-26T12:00Z'?datetime.iso?string("EEEE yyyy-MM-dd z")}
{code}

prints this:

{code}
วันพฤหัสบดี 2561-04-26 GMT+07:00
{code}

which is correct according to your example.

The time zone does matter! The same point on the UTC time can falls to 2 different days depending
on it. Maybe that's where the problem is?

> Wrong day of the week shown for the Thai locale
> -----------------------------------------------
>
>                 Key: FREEMARKER-95
>                 URL: https://issues.apache.org/jira/browse/FREEMARKER-95
>             Project: Apache Freemarker
>          Issue Type: Bug
>            Reporter: James Barnes
>            Priority: Major
>
> Freemarker returns the wrong day of the week when the user sets the the locale to Thai.
It would seem that this is a result of Freemarker not correcting for the Buddhist calendar.
The day of the week is currently out of sync but will be back in sync on Feb 28 2019 and then
will be out of sync again on Feb 29 2020. So currently when the user sets the locale to Thai,
FreeMarker uses the days of the week from 1475 on the Gregorian calendar.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message