-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Datetime date from CLDR data #329
Conversation
I need some help converting these date/time data into UTC "Z" format. Then we can compute the offset seconds too! Right now, testing this in ICU75 causes all ICU4C, ICU4J and NodeJS tests to fail or have errors. |
Note that the CLDR expected test results may be incorrect in some cases:
Expected: July 2, 2001, 5:44:15 PM GMT+4:30 {
{ { |
This now uses simple logic to identify the "known issue" of " at" replacing "," in some cases. Similarly, some other substitutions are caught. Note also that the test data shows an ASCII comma as expected instead of the Arabic comma. These show up as test failures, but maybe it's a bug in the CLDR data. |
verifier/check_known_issues.py
Outdated
replacements = {',': ' at', '،': ' في', | ||
} | ||
|
||
sm = SequenceMatcher(None, expected, actual) |
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 a much more complicated known-issue catcher than I was expecting. I was expecting that we would put a blanket "known issue" on all failing inputs where the dateTimeFormatType is "standard".
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.
OK, I'll take a look at the failures to see if this will capture the substitution of "," with " at" and similar replacements in other languages.
Categorize failing date time tests with 'dateTimeFormatType" == 'standard' to be a "Known Issue". |
Ready for another look! |
This classifies most of the date time format problems as "known issue" except for the different beween ASCII comma and arabic comma. |
verifier/testreport.py
Outdated
@@ -731,7 +731,8 @@ def characterize_datetime_tests(self, test_list, results): | |||
if 'skeleton' in test['input_data']: | |||
skeleton_str = 'skeleton: ' + test['input_data']['skeleton'] | |||
results.setdefault(skeleton_str, []).append(label) | |||
|
|||
if 'dateTimeFormatType' in test: | |||
results.setdefault('dateTimeFormatType: ' + test['dateTimeFormatType'], []) |
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.
do you need to chain a .append(label)
to this operation? otherwise, as it is, .setdefault()
doesn't actually do anything to the map, it just gives a default value operate on when the key doesn't yet exist
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
Ready for review.