Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 604 Bytes

File metadata and controls

19 lines (14 loc) · 604 Bytes
title Unix Timestamp (milliseconds)
version 1.0.0
signature moment().valueOf(); +moment();

moment#valueOf simply outputs the number of milliseconds since the Unix Epoch, just like Date#valueOf.

moment(1318874398806).valueOf(); // 1318874398806
+moment(1318874398806); // 1318874398806

To get a Unix timestamp (the number of seconds since the epoch) from a Moment, use moment#unix.

Note: ECMAScript calls this a "Time Value"