[ 
https://issues.apache.org/jira/browse/SLING-9983?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Konrad Windszus updated SLING-9983:
-----------------------------------
    Description: 
SLING-6102 introduced possibilities to format dates as mandated by the spec: 
https://github.com/adobe/htl-spec/blob/1.3/SPECIFICATION.md#122-format.

The problem is that those patterns in general (even if a locale is passed) 
differ a lot between countries and languages. For that reason Java defines some 
[standard formats 
|https://docs.oracle.com/javase/tutorial/i18n/format/dateFormat.html] which 
work for all languages/countries. The special strings "DEFAULT", "SHORT", 
"MEDIUM", "LONG", and "FULL" should be accepted as values which should lead to 
using 
https://docs.oracle.com/javase/8/docs/api/java/text/DateFormat.html#getDateInstance-int-java.util.Locale-
 as formatter

  was:
SLING-6140 introduced possibilities to format dates as mandated by the spec: 
https://github.com/adobe/htl-spec/blob/1.3/SPECIFICATION.md#122-format.

The problem is that those patterns in general (even if a locale is passed) 
differ a lot between countries and languages. For that reason Java defines some 
[standard formats 
|https://docs.oracle.com/javase/tutorial/i18n/format/dateFormat.html] which 
work for all languages/countries. The special strings "DEFAULT", "SHORT", 
"MEDIUM", "LONG", and "FULL" should be accepted as values which should lead to 
using 
https://docs.oracle.com/javase/8/docs/api/java/text/DateFormat.html#getDateInstance-int-java.util.Locale-
 as formatter


> Add support for predefined date formats
> ---------------------------------------
>
>                 Key: SLING-9983
>                 URL: https://issues.apache.org/jira/browse/SLING-9983
>             Project: Sling
>          Issue Type: Improvement
>          Components: Scripting
>    Affects Versions: Scripting HTL Runtime 1.2.4-1.4.0
>            Reporter: Konrad Windszus
>            Priority: Major
>
> SLING-6102 introduced possibilities to format dates as mandated by the spec: 
> https://github.com/adobe/htl-spec/blob/1.3/SPECIFICATION.md#122-format.
> The problem is that those patterns in general (even if a locale is passed) 
> differ a lot between countries and languages. For that reason Java defines 
> some [standard formats 
> |https://docs.oracle.com/javase/tutorial/i18n/format/dateFormat.html] which 
> work for all languages/countries. The special strings "DEFAULT", "SHORT", 
> "MEDIUM", "LONG", and "FULL" should be accepted as values which should lead 
> to using 
> https://docs.oracle.com/javase/8/docs/api/java/text/DateFormat.html#getDateInstance-int-java.util.Locale-
>  as formatter



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to