Skip to content
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

Improve date/time parsing #834

Merged
merged 3 commits into from
Jan 28, 2022
Merged

Improve date/time parsing #834

merged 3 commits into from
Jan 28, 2022

Conversation

akx
Copy link
Member

@akx akx commented Jan 27, 2022

Fixes #442
Fixes #657
Closes #448 (supersedes it)
Closes #767 (supersedes it)
Closes #659 (supersedes it)

@codecov
Copy link

codecov bot commented Jan 27, 2022

Codecov Report

Merging #834 (f420e96) into master (d3cea2a) will increase coverage by 0.02%.
The diff coverage is 100.00%.

❗ Current head f420e96 differs from pull request most recent head 8a5e4bd. Consider uploading reports for the commit 8a5e4bd to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #834      +/-   ##
==========================================
+ Coverage   91.09%   91.12%   +0.02%     
==========================================
  Files          23       23              
  Lines        4123     4136      +13     
==========================================
+ Hits         3756     3769      +13     
  Misses        367      367              
Impacted Files Coverage Δ
babel/dates.py 92.55% <100.00%> (+0.14%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d3cea2a...8a5e4bd. Read the comment docs.

akx and others added 3 commits January 28, 2022 11:07
Refs python-babel#442

Co-authored-by: David Bauer <david.bauer009@gmail.com>
Co-authored-by: Arthur Jovart <arthur@jovart.com>
``parse_date()`` does not allow the user to specify the date's format
and the 'medium' format is used by default in the call to
``get_date_format()`` on line 1144.

This results in a failure to parse the date in short format for the
locale 'sv_SE'. This commit adds the format argument to avoid this
failure. The default value is set to 'medium' to preserve the old behavior.

Fixes python-babel#657

Co-authored-by: Aarni Koskela <akx@iki.fi>
@akx akx force-pushed the improve-date-parse branch from d9246f4 to 8a5e4bd Compare January 28, 2022 09:07
@akx akx added this to the Babel 2.10 milestone Jan 28, 2022
@akx akx merged commit 9033f02 into python-babel:master Jan 28, 2022
@akx akx deleted the improve-date-parse branch April 8, 2022 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants