mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 13:53:34 +00:00
fix incorrect handling of the first day of the next month is isCardExpired (#11337)
This commit is contained in:
@@ -82,10 +82,10 @@ export function isCardExpired(cipherCard: CardView): boolean {
|
|||||||
|
|
||||||
const parsedYear = parseInt(normalizedYear, 10);
|
const parsedYear = parseInt(normalizedYear, 10);
|
||||||
|
|
||||||
// First day of the next month minus one, to get last day of the card month
|
// First day of the next month
|
||||||
const cardExpiry = new Date(parsedYear, parsedMonth + 1, 0);
|
const cardExpiry = new Date(parsedYear, parsedMonth + 1, 1);
|
||||||
|
|
||||||
return cardExpiry < now;
|
return cardExpiry <= now;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user