Permalink
Fetching contributors…
Cannot retrieve contributors at this time
20 lines (14 sloc) 414 Bytes
title version signature
Unix Timestamp (seconds)
1.6.0
moment.unix(Number)

To create a moment from a Unix timestamp (seconds since the Unix Epoch), use moment.unix(Number).

var day = moment.unix(1318781876);

This is implemented as moment(timestamp * 1000), so partial seconds in the input timestamp are included.

var day = moment.unix(1318781876.721);