Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-9983

Add support for predefined date format styles

    XMLWordPrintableJSON

Details

    Description

      SLING-6399 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 date patterns patterns in general (even if a locale is passed) differ a lot between countries and languages. For that reason Java defines some standard formats 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. They are also defined by Unicode CLDR: http://cldr.unicode.org/translation/date-time-1/date-time-patterns#TOC-Basic-Date-Formats

      Attachments

        Issue Links

          Activity

            People

              radu Radu Cotescu
              kwin Konrad Windszus
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 50m
                  1h 50m