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
Add 'Sept' for 'September' #1071
Conversation
Due to an error with my Google Sheets table, I found that Google (and [DIN 5008](https://www.din-5008-richtlinien.de/startseite/datum/)) use `Sept` as abbreviation for `September`, but `dateparser` only understood `Sep`. It looks like both `Sept` and `Sep` are valid. This PR adds `Sept` as variant of `September`.
@serhii73 : thanks a lot for your response. I have updated the JSON data now and also included a test. |
I believe the CLDR data JSON file is not meant to be updated manually, that you should be updating the YAML file instead. |
I don't think so: the script in if language in cldr_languages:
with open(cldr_date_directory + language + '.json') as f:
cldr_data = json.load(f, object_pairs_hook=OrderedDict)
if language in supplementary_languages:
with open(supplementary_date_directory + language + '.yaml') as g:
supplementary_data = OrderedDict(RoundTripLoader(g).get_data())
complete_data = combine_dicts(cldr_data, supplementary_data) At least, when running the script, the Python files get updated based on the changes in the JSON or YAML files. |
Yes, and the CLDR file is meant to be kept in line with the upstream CLDR file, without customizations of any kind. Customizations are managed on the YAML files. Otherwise, your changes get removed the next time we run https://github.com/scrapinghub/dateparser/blob/master/dateparser_scripts/get_cldr_data.py. |
@Gallaecio : the upstream files in the given repos will not change as the repos are currently archived, see the referenced repos from There is however a newer still maintained repo at https://github.com/unicode-org/cldr-json/ , and they seem to have How should I proceed here now? Next year, in September, my scripts will crash again... :-( |
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.
I added a fix in the last commit, and the PR looks good.
Thank you very much.
Codecov ReportBase: 98.23% // Head: 98.23% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## master #1071 +/- ##
=======================================
Coverage 98.23% 98.23%
=======================================
Files 232 232
Lines 2605 2605
=======================================
Hits 2559 2559
Misses 46 46
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
@wulmer Abotu CLDR data being outdated, that is it seems a known issue, and definitely one we would like to address. |
Apologize for necroing this PR, but I just want to notify that it seems the fix by @serhii73 is not merged in this PR. I've checked the master branch, and the |
Due to an error with my Google Sheets table, I found that Google (and DIN 5008) use
Sept
as abbreviation forSeptember
, butdateparser
only understoodSep
. It looks like bothSept
andSep
are valid.This PR adds
Sept
as variant ofSeptember
.