[pull] master from scrapinghub:master - #104
Merged
Merged
Conversation
) * Improve Czech (cs) language data (#1172) - Add month locative/dative forms (lednu, únoru, březnu, dubnu, květnu, červnu, červenci, srpnu, říjnu, prosinci) for dates like "v lednu 2023" - Add July abbreviation "črv" - Fix "za měsíc/týden/rok" not parsing: add accusative simplification patterns (previous patterns only matched instrumental -em forms) - Add tests covering the new expressions Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> * Reject a %j day of year that the parsed year does not have datetime.strptime resolves a day of year past the end of the parsed year into the next year, so day 366 of a non-leap year became January 1 of the following year: >>> dateparser.parse("1999366", date_formats=["%Y%j"]) datetime.datetime(2000, 1, 1, 0, 0) The returned year contradicted the year in the input, and invalid values were rejected inconsistently: day 367 gave None while day 366 gave a date. The std lib keeps the value it read for %j in struct_time.tm_yday even after rolling the date into the next year, so the rollover can be spotted by comparing it with the day of year of the resulting date. When the two differ, strptime() now raises ValueError, which parse_with_formats() already handles as "this format does not match". _prepare_format() now also reports whether the format holds a real %j directive, so that an escaped "%%j" literal is not mistaken for one. Fixes #271. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )