]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Add a unixValueOf that returns the unix timestamp in seconds.
authorVincent Roy <vincentroy8@gmail.com>
Wed, 21 Mar 2012 11:52:33 +0000 (17:22 +0530)
committerVincent Roy <vincentroy8@gmail.com>
Wed, 21 Mar 2012 11:52:33 +0000 (17:22 +0530)
moment.js

index e2415e97b686a8732a7acc7f2f3ac0c7c8e56a83..88da48220657d716bb0d42c906dc7e654eb685c2 100644 (file)
--- a/moment.js
+++ b/moment.js
             return this;
         },
 
+        unixValueOf : function () {
+            return parseInt(this.valueOf() / 1000, 10);
+        },
+
         local : function () {
             this._isUTC = false;
             return this;