From: Kevin Marx Date: Thu, 30 May 2013 12:24:07 +0000 (-0500) Subject: aliasing the toISOString method to the toJSON method X-Git-Tag: 2.1.0~26^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F806%2Fhead;p=thirdparty%2Fmoment.git aliasing the toISOString method to the toJSON method --- diff --git a/moment.js b/moment.js index 3f7b2a544..928414cd1 100644 --- a/moment.js +++ b/moment.js @@ -1157,10 +1157,6 @@ 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 [ @@ -1474,6 +1470,9 @@ moment.fn.weeks = moment.fn.week; moment.fn.isoWeeks = moment.fn.isoWeek; + // add aliased format methods + moment.fn.toISOString = moment.fn.toJSON; + /************************************ Duration Prototype ************************************/