A local-first personal finance app
fix(import): accept "Sept" as a month abbreviation in CSV dates (#8957)
John Costa036be73a8425
diff --git a/packages/desktop-client/src/components/modals/ImportTransactionsModal/utils.test.ts b/packages/desktop-client/src/components/modals/ImportTransactionsModal/utils.test.tsindex 3c30c94535..702935a184 100644--- a/packages/desktop-client/src/components/modals/ImportTransactionsModal/utils.test.ts+++ b/packages/desktop-client/src/components/modals/ImportTransactionsModal/utils.test.ts@@ -84,6 +84,7 @@ describe('Import transactions', () => {['Dec 24, 2020', '2020-12-24'],['Dec. 24, 2020', '2020-12-24'],['December 24, 2020', '2020-12-24'],+ ['Sept 6, 2026', '2026-09-06'],['12242020', '2020-12-24'],['1 24 2020', '2020-01-24'],['01 24 2020', '2020-01-24'],@@ -119,6 +120,7 @@ describe('Import transactions', () => {['24 Dec 2020', '2020-12-24'],['24 Dec. 2020', '2020-12-24'],['24 December 2020', '2020-12-24'],+ ['6 Sept 2026', '2026-09-06'],['24122020', '2020-12-24'],['24 12 2020 ', '2020-12-24'],['2 12 2020', '2020-12-02'],@@ -138,6 +140,8 @@ describe('Import transactions', () => {['24 Dec 20', '2020-12-24'],['24 Dec. 20', '2020-12-24'],['24 December 20', '2020-12-24'],+ ['06 Sept 26', '2026-09-06'],+ ['06 Sept. 26', '2026-09-06'],['241220', '2020-12-24'],['2412 20 ', '2020-12-24'],['24-12-20', '2020-12-24'],diff --git a/packages/desktop-client/src/components/modals/ImportTransactionsModal/utils.ts b/packages/desktop-client/src/components/modals/ImportTransactionsModal/utils.tsindex 6f7ca7db9f..33f1d6eb96 100644--- a/packages/desktop-client/src/components/modals/ImportTransactionsModal/utils.ts+++ b/packages/desktop-client/src/components/modals/ImportTransactionsModal/utils.ts@@ -45,7 +45,7 @@ export function parseDate(.replace(/\bjun(\.|e)?\b/i, '06').replace(/\bjul(\.|y)?\b/i, '07').replace(/\baug(\.|ust)?\b/i, '08')- .replace(/\bsep(\.|tember)?\b/i, '09')+ .replace(/\bsep(\.|t\.?|tember)?\b/i, '09').replace(/\boct(\.|ober)?\b/i, '10').replace(/\bnov(\.|ember)?\b/i, '11').replace(/\bdec(\.|ember)?\b/i, '12')diff --git a/upcoming-release-notes/fix-csv-import-sept-month.md b/upcoming-release-notes/fix-csv-import-sept-month.mdnew file mode 100644index 0000000000..d6790ab31f--- /dev/null+++ b/upcoming-release-notes/fix-csv-import-sept-month.md@@ -0,0 +1,6 @@+---+category: Bugfix+authors: [costajohnt]+---++Accept the "Sept" month abbreviation when parsing dates during CSV import