]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
aliasing the toISOString method to the toJSON method 806/head
authorKevin Marx <kevin.marx@tstmedia.com>
Thu, 30 May 2013 12:24:07 +0000 (07:24 -0500)
committerKevin Marx <kevin.marx@tstmedia.com>
Thu, 30 May 2013 12:24:07 +0000 (07:24 -0500)
moment.js

index 3f7b2a5440a09705b5319bd8adf918d43eb57f81..928414cd1e1e8660df161243e8a74468d29cc111 100644 (file)
--- a/moment.js
+++ b/moment.js
             return formatMoment(moment(this).utc(), 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
         },
 
-        toISOString: function () {
-            return moment.utc(this).format('YYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
-        },
-
         toArray : function () {
             var m = this;
             return [
     moment.fn.weeks = moment.fn.week;
     moment.fn.isoWeeks = moment.fn.isoWeek;
 
+    // add aliased format methods
+    moment.fn.toISOString = moment.fn.toJSON;
+
     /************************************
         Duration Prototype
     ************************************/