mirror of
https://github.com/bitwarden/browser.git
synced 2025-03-02 03:41:09 +01:00
fix incorrect handling of the first day of the next month is isCardExpired (#11337)
This commit is contained in:
parent
b149db9f4d
commit
f1b343e056
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user