fix incorrect handling of the first day of the next month is isCardExpired (#11337)

This commit is contained in:
Jonathan Prusik 2024-09-30 12:01:42 -04:00 committed by GitHub
parent b149db9f4d
commit f1b343e056
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -82,10 +82,10 @@ export function isCardExpired(cipherCard: CardView): boolean {
const parsedYear = parseInt(normalizedYear, 10);
// First day of the next month minus one, to get last day of the card month
const cardExpiry = new Date(parsedYear, parsedMonth + 1, 0);
// First day of the next month
const cardExpiry = new Date(parsedYear, parsedMonth + 1, 1);
return cardExpiry < now;
return cardExpiry <= now;
}
}