Skip to content

Fix end of year edge case - #2

Open
dekdaas wants to merge 1 commit into
saranrapjs:masterfrom
dekdaas:master
Open

Fix end of year edge case#2
dekdaas wants to merge 1 commit into
saranrapjs:masterfrom
dekdaas:master

Conversation

@dekdaas

@dekdaas dekdaas commented Jul 20, 2025

Copy link
Copy Markdown

I've identified an edge case for constructing m/d/Y dates for transactions.
The year of the statement is determined by a regex on the "Totals Year-to-Date" info box. This year is then used to add a year to all m/d 'Date of Transaction' parsed values.
A statement's transactions spans the second half of the previous month and the first half of the current month. So using the year of the statement is incorrect for the December transactions of January statements.

In this PR, a function to check for December and January transactions and to revise the December transactions' dates in introduced.

An alternate approach to avoiding this issue could be to extract the year from the 'Opening/Closing Date' of the "Account Summary" info box and matching the months of parsed transaction dates, assuming all ingested statements are from the year 2000 on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant