Skip to content

Commit

Permalink
Update index_m.html
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-blackson committed Jul 27, 2023
1 parent f4988f3 commit bb5cd6d
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions admin/index_m.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,32 @@
})
}
}
// update setup entries
for (var i = 0; i < countdownData.length; i++) {

console.log('orig Date: ' + countdownData[i].countdownDate)

var dateMomentObject = moment(countdownData[i].countdownDate, "YYYY-MM-DD");
console.log('New Date: ' + dateMomentObject)

var dateString = moment(dateMomentObject).local().format('DD.MM.YYYY')
dateString += ' ' + countdownData[i].countdownTime + ':00'

if (countdownData[i].countdownRepeatCycle != ''){
dateString += '+' + countdownData[i].countdownRepeatCycle
}
if (countdownData[i].countdownCountUp){
dateString += '#'
}
console.log('DateString: ' + dateString)


sendTo(adapter + '.' + instance, 'send', {
"name": countdownData[i].countdownName,
"date": dateString
})

}

}

Expand Down

0 comments on commit bb5cd6d

Please sign in to comment.