fleetmap-reports 1.0.991 → 1.0.992

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fleetmap-reports",
3
- "version": "1.0.991",
3
+ "version": "1.0.992",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/kms-report.js CHANGED
@@ -293,7 +293,7 @@ async function exportKmsReportToPDF (userData, reportData) {
293
293
  if (d.days) {
294
294
  d.days.forEach(day => {
295
295
  const temp = [
296
- new Date(day.date).toLocaleDateString() + ' - ' + weekDays[day.date.getDay()],
296
+ new Date(day.date).toLocaleDateString() + ' - ' + weekDays[new Date(day.date).getDay()],
297
297
  (day.kms / 1000).toFixed(0)
298
298
  ]
299
299
 
@@ -484,7 +484,7 @@ function getExcelContent (userData, d, translations) {
484
484
  group: group ? group.name : '',
485
485
  licenseplate: d.device.attributes.license_plate,
486
486
  date: a.date,
487
- weekday: weekDays[a.date.getDay()],
487
+ weekday: weekDays[new Date(a.date).getDay()],
488
488
  distance: Number((a.kms / 1000).toFixed(0))
489
489
  }
490
490
  })))