Skip to content

Commit

Permalink
chore(banks/hsbc): support new statement header format
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamin-awd committed Nov 24, 2024
1 parent 5c5bb3d commit 55fbab6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/monopoly/banks/hsbc/hsbc.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ class Hsbc(BankBase):

credit = StatementConfig(
statement_type=EntryType.CREDIT,
statement_date_pattern=regex(rf"Statement From .* to {ISO8601.DD_MMM_YYYY}"),
statement_date_pattern=regex(
rf"From \d{{2}} \w{{3}} \d{{4}} to {ISO8601.DD_MMM_YYYY}"
),
header_pattern=regex(r"(DATE.*DESCRIPTION.*AMOUNT)"),
prev_balance_pattern=StatementBalancePatterns.HSBC,
transaction_pattern=CreditTransactionPatterns.HSBC,
Expand Down

0 comments on commit 55fbab6

Please sign in to comment.