Fix Bug #7: setMonth(mm-1) quando selezionato Febbraio ritorna Marzo

This commit is contained in:
System Administrator 2017-12-30 23:34:50 +01:00
parent 3d6a36a1b9
commit a08357194c
5 changed files with 5 additions and 5 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -67,7 +67,7 @@ class CodiceFiscale {
static dateCode (gg, mm, aa, gender) { static dateCode (gg, mm, aa, gender) {
const date = new Date() const date = new Date()
date.setYear(aa) date.setYear(aa)
date.setMonth(mm - 1) date.setMonth(mm - 1, 1)
date.setDate(gg) date.setDate(gg)
// Padding year // Padding year
let year = '0' + date.getFullYear() let year = '0' + date.getFullYear()