Skip to content

Commit

Permalink
fix incorrect handling of the first day of the next month is isCardEx…
Browse files Browse the repository at this point in the history
…pired (#11337)
  • Loading branch information
jprusik authored Sep 30, 2024
1 parent b149db9 commit f1b343e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libs/common/src/autofill/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit f1b343e

Please sign in to comment.