-
Notifications
You must be signed in to change notification settings - Fork 412
CLDR-18574 Fix coverage for iso8601 #4653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
FYI, with the debug flag on, the unit test shows the levels that result. The comprehensive ones will not show up in the survey tool. They will be be the same as Gregorian. They are included here so that we can verify that we don't want any of them. The ones we do want are date (or date interval) skeletons with more than one field. These are the ones that have ordering issues. The ones we don't want are:
|
|
I changed the printout so that reviewers could see more clearly which of the items are being excluded. |
So that reviewers could see which items are excluded (comprehensive) or not (moderate/modern).
To show what happens with more values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
| // drop IDs unless they have y+M or M+d | ||
| List<String> raw = | ||
| Splitters.VBAR.splitToList( | ||
| "MMMMd|MMMMW|MMMMW|yw|yw|yQQQ|yQQQQ|Gy|Gy|GyM|GyM|GyM|GyMd|GyMd|GyMd|GyMd|GyMEd|GyMEd|GyMEd|GyMEd|GyMMM|GyMMM|GyMMM|GyMMMd|GyMMMd|GyMMMd|GyMMMd|GyMMMEd|GyMMMEd|GyMMMEd|GyMMMEd|Md|Md|MEd|MEd|MMMd|MMMd|MMMEd|MMMEd|Ed|yM|yM|yMd|yMd|yMd|yMEd|yMEd|yMEd|yMMM|yMMM|yMMMd|yMMMd|yMMMd|yMMMEd|yMMMEd|yMMMEd|yMMMM|yMMMM"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be generated from 'those without y+M or M+d'? seems fragile to have yet another static list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just for testing.
| } | ||
| } | ||
| } | ||
| if (Level.CORE_TO_MODERN.contains(level) == expectedComprehensive) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if (Level.CORE_TO_MODERN.contains(level) == expectedComprehensive) { | |
| if (!level.isAbove(MODERN) == expectedComprehensive) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good suggestion but I didn't want to wait on getting PR in.
CLDR-18574
This narrows the coverage of iso8601 to only date patterns. For available and interval formats, that is tested by making sure that the
idvalue matches a regular expression that contains 2 "date" pattern characters. That uses the line:The regex has the optional non " characters before and after, and sees if there are certain pairs, like Gy or Md. That is, it excludes singleton date characters like value='d', because ordering does not matter for them.
Adds a test, and a couple of GP utility classes.
ALLOW_MANY_COMMITS=true