Why moment().startOf('day')
shows as Moment<2020-05-01T00:00:00+02:00>
, in Nodejs ??
I want to show the date only, how to get the date only without Moment
word and < >
symbols.. !
Why moment().startOf('day')
shows as Moment<2020-05-01T00:00:00+02:00>
, in Nodejs ??
I want to show the date only, how to get the date only without Moment
word and < >
symbols.. !
So startOf()
returns a moment object, what you're wanting to do is some kind of format of the output object.
console.log(moment()
.endOf('day')
.toISOString()) // 2020-05-18T21:59:59.999Z