I'm using the following to get the end of day for a date coming from a date picker:
var date = DateTime.fromISO('2018-05-05').endOf('day');
What I want to end up with is
"2018-05-05T23:59:59+02:00"
however, I cannot get rid of the milliseconds:
console.log(date.toISO({suppressMilliseconds: true}));
// => outputs "2018-05-05T23:59:59.999+02:00"
Is there a more elegant way to do this besides simply setting the millisecond
to 0:
date.c.millisecond = 0;
console.log(date.toISO({suppressMilliseconds: true}));
// => outputs "2018-05-05T23:59:59+02:00"