How to return the current timestamp with Moment.js?

Folks,

I am trying to understand the MomentJS API. What is the appropriate way to get the current time on the machine?

var CurrentDate = moment();

vs

var CurrentDate = moment().format();

Trying to parse their docs, and its not apparent what to use.

http://momentjs.com/docs/#/query/is-a-moment/

12 Answers
12

Leave a Comment