|
|
@ -136,10 +136,12 @@ module.exports = { |
|
|
|
|
|
|
|
|
|
|
|
buildModLog: async (options) => { |
|
|
|
buildModLog: async (options) => { |
|
|
|
if (!options.startDate || !options.endDate) { |
|
|
|
if (!options.startDate || !options.endDate) { |
|
|
|
options.startDate = new Date(); //this is being built by action handler so will always be current date
|
|
|
|
const d = new Date(); |
|
|
|
options.endDate = new Date(options.startDate.getTime()); |
|
|
|
const month = d.getUTCMonth() |
|
|
|
options.startDate.setHours(0,0,0,0); |
|
|
|
, day = d.getUTCDate() |
|
|
|
options.endDate.setHours(23,59,59,999); |
|
|
|
, year = d.getUTCFullYear(); |
|
|
|
|
|
|
|
options.startDate = new Date(Date.UTC(year, month, day, 0, 0, 0, 0)); |
|
|
|
|
|
|
|
options.endDate = new Date(Date.UTC(year, month, day, 23, 59, 59, 999)); |
|
|
|
} |
|
|
|
} |
|
|
|
const day = ('0'+options.startDate.getDate()).slice(-2); |
|
|
|
const day = ('0'+options.startDate.getDate()).slice(-2); |
|
|
|
const month = ('0'+(options.startDate.getMonth()+1)).slice(-2); |
|
|
|
const month = ('0'+(options.startDate.getMonth()+1)).slice(-2); |
|
|
|