From ce992c312c27ddbd35ae74b89bca64086a025bc6 Mon Sep 17 00:00:00 2001 From: Kevin Marx Date: Thu, 30 May 2013 07:24:07 -0500 Subject: [PATCH] aliasing the toISOString method to the toJSON method --- moment.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 ************************************/ -- 2.47.2