1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-16 12:55:14 +03:00

chore: removenested template literals

This commit is contained in:
Tomas Chmelevskij 2021-12-19 08:08:16 +01:00
parent 8cf9473c88
commit 6e6c3f76ae
3 changed files with 10 additions and 3 deletions

View file

@ -205,7 +205,12 @@ firmware_flasher.initialize = function (callback) {
return;
}
const date = new Date(release.published_at);
const formattedDate = `${(`0${ date.getDate()}`).slice(-2) }-${ (`0${ date.getMonth() + 1}`).slice(-2) }-${ date.getFullYear() } ${ (`0${ date.getHours()}`).slice(-2) }:${ (`0${ date.getMinutes()}`).slice(-2)}`;
const dayOfTheMonth = `0${date.getDate()}`.slice(-2);
const month = `0${date.getMonth() + 1}`.slice(-2);
const year = date.getFullYear();
const hours = `0${date.getHours()}`.slice(-2);
const minutes = `0${ date.getMinutes()}`.slice(-2);
const formattedDate = `${dayOfTheMonth}-${month}-${year} ${hours}:${minutes}`;
const descriptor = {
"releaseUrl": release.html_url,
"name" : version,