From: Vincent Roy Date: Wed, 21 Mar 2012 11:52:33 +0000 (+0530) Subject: Add a unixValueOf that returns the unix timestamp in seconds. X-Git-Tag: 1.5.1~2^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=107268eae28bf2879026b0b1b103fc7047e891c7;p=thirdparty%2Fmoment.git Add a unixValueOf that returns the unix timestamp in seconds. --- diff --git a/moment.js b/moment.js index e2415e97b..88da48220 100644 --- a/moment.js +++ b/moment.js @@ -599,6 +599,10 @@ return this; }, + unixValueOf : function () { + return parseInt(this.valueOf() / 1000, 10); + }, + local : function () { this._isUTC = false; return this;