fix(payments,dates): improve duplicate payment detection and Jalali date parsing

This commit is contained in:
2026-08-23 14:15:06 +03:30
parent 945b4e6332
commit 22ce6c3fb1
3 changed files with 36 additions and 4 deletions
+4
View File
@@ -14,5 +14,9 @@ describe('jalaliDate', () => {
it('parses ISO and jalali values into UTC midnight dates', () => {
assert.equal(parseImportDate('2026-07-14').toISOString(), '2026-07-14T00:00:00.000Z');
assert.equal(parseImportDate('1405.5.12').toISOString(), '2026-08-03T00:00:00.000Z');
assert.equal(parseImportDate('1405/05/26').toISOString(), '2026-08-17T00:00:00.000Z');
assert.equal(parseImportDate('1405-05-26').toISOString(), '2026-08-17T00:00:00.000Z');
assert.equal(parseImportDate('۱۴۰۵/۰۵/۲۶').toISOString(), '2026-08-17T00:00:00.000Z');
assert.equal(parseImportDate('2026-08-17T00:00:00.000Z').toISOString(), '2026-08-17T00:00:00.000Z');
});
});