parseContact: Be resilient to invalid phone numbers

This commit is contained in:
Scott Nonnenberg
2025-01-22 13:55:57 -10:00
committed by GitHub
parent 6acdf74995
commit c7f2141b5b
4 changed files with 52 additions and 20 deletions

View File

@@ -88,7 +88,7 @@ describe('timestamp', () => {
});
it('formats month name, day of month, year, and time for other times', () => {
const rx = /Apr 20, 2000, \d+:\d+ [A|P]M/;
const rx = /Apr (19|20|21), 2000, \d+:\d+ [A|P]M/;
const datetime = formatDateTimeLong(i18n, new Date(956216013000));
assert.isTrue(rx.test(datetime));
});