I want to get Unix TimeStamp using Moment.js. I can find many functions that convert a timestamp to a date in moment.js. I know that I can easily get the Unix timestamp using the following JavaScript function: Math.floor(new Date().getTime()/1000) .
But I want to use Moment.js to get the same result. Is there a direct function in moment.js to get the current timestamp?
unix-timestamp momentjs
chandan Aug 26 '14 at 6:11 2014-08-26 06:11
source share