Sometimes, we want to get current date with Moment and JavaScript.
In this article, we’ll look at how to get current date with Moment and JavaScript.
How to get current date with Moment and JavaScript?
To get current date with Moment and JavaScript, we use the moment
function without any arguments.
For instance, we write
const datetime = moment();
to call moment
to get a moment object with the current date.
Conclusion
To get current date with Moment and JavaScript, we use the moment
function without any arguments.