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 format heuristic for bank statement import #4814

Merged
merged 1 commit into from
Feb 10, 2025

Conversation

kiancross
Copy link
Contributor

When dates are ambiguous, use the event's locale to infer whether the day or month comes first. Since regions follow certain date format conventions, this helps make more accurate guesses.

This could probably be improved by (1) adding other countries to the check (although this can be extended later), or even better, (2) allowing the date format to be specified to avoid any wrong interpretations. However, I think this might be a reasonable stepping stone.

@cla-bot cla-bot bot added the cla-signed label Feb 6, 2025
When dates are ambiguous, use the event's locale to infer whether the
day or month comes first. Since regions follow certain date format
conventions, this helps make more accurate guesses.
@kiancross kiancross force-pushed the bank-transfer-heuristic branch from 015d17f to 4e03a89 Compare February 6, 2025 21:16
Copy link

codecov bot commented Feb 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.43%. Comparing base (c4436ca) to head (4e03a89).
Report is 22 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4814   +/-   ##
=======================================
  Coverage   78.43%   78.43%           
=======================================
  Files         445      445           
  Lines       63063    63063           
=======================================
  Hits        49466    49466           
  Misses      13597    13597           
Files with missing lines Coverage Δ
src/pretix/plugins/banktransfer/tasks.py 84.33% <100.00%> (ø)

@raphaelm raphaelm merged commit 5bf6980 into pretix:master Feb 10, 2025
12 checks passed
@kiancross kiancross deleted the bank-transfer-heuristic branch February 10, 2025 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants