make date format correct
parent
b8c10d75a6
commit
b0831d19be
12
app.js
12
app.js
|
|
@ -100,7 +100,7 @@ class App {
|
|||
console.log(lieferschein)
|
||||
const data = {
|
||||
id: lieferschein.cLieferscheinNr,
|
||||
date: sendDate.getDate()+'.'+ (sendDate.getMonth() +1) +'.'+sendDate.getFullYear(),
|
||||
date: this.#formatDate(sendDate),
|
||||
trackingNr: excelFileData['Sendungs-Nr.'],
|
||||
infos: excelFileData['Lieferschein-Nr.'],
|
||||
returnTrackingNr:''
|
||||
|
|
@ -119,6 +119,16 @@ class App {
|
|||
csvExport.add(data)
|
||||
}
|
||||
|
||||
#formatDate(d) {
|
||||
|
||||
let day = d.getDate()
|
||||
if (day < 10) day = `0${day}`
|
||||
let month = d.getMonth() + 1
|
||||
if (month < 10) month = `0${month}`
|
||||
let year = d.getFullYear()
|
||||
return day +'.'+ month +'.'+year
|
||||
}
|
||||
|
||||
|
||||
|
||||
async #createLabelData(excelFileData, jtlOrderData, paketData) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue