We're updating the issue view to help you get more done. 

Add constraints to date patterns

Description

Add errors when the following are not true. (First examine to make sure they make sense.)

  1. The stock formats are consistent with the flexible formats.

Produce a skeleton from the stock format, and use the flexible format to regenerate the pattern. Must be the same.

2. One side of an interval format must be the same as a non-interval format.

yMEd/y => dd.MM.y, E – dd.MM.y, E
so one of the two sides must equal: eg yMEd => dd.MM.y, E

3. Subskeletons have the same order.

Remove each of the possible date symbols from a skeleton. If there is a flexible format for that subskeleton, then it must have the same order of date symbols.

Eg the following would be an error
GyMEd => E, dd.MM.y G (order EdMy)
yMEd => dd.MM.y, E (order dMyE)

4. Look at other regularities: eg, are the G and y always adjacent?

Environment

xpath

None

locale

None

Status

Assignee

Peter Edberg

Reporter

Mark Davis

tracReporter

mark

tracOwner

pedberg

tracStatus

accepted

phase

dsub

tracCreated

Nov 23, 2018, 8:04 AM

Components

Fix versions

Priority

major