From 762f16ff8415ec693a3222c390194c438bf99ba3 Mon Sep 17 00:00:00 2001 From: Iskren Chernev Date: Tue, 6 Aug 2013 23:27:10 -0700 Subject: [PATCH] Moment, Duration and Language objects now have constructor property --- moment.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/moment.js b/moment.js index 2c1bf2c8e..3f9594ad1 100644 --- a/moment.js +++ b/moment.js @@ -371,7 +371,8 @@ ************************************/ - Language.prototype = { + extend(Language.prototype, { + set : function (config) { var prop, i; for (i in config) { @@ -541,7 +542,7 @@ dow : 0, // Sunday is the first day of the week. doy : 6 // The week that contains Jan 1st is the first week of the year. } - }; + }); // Loads a language definition into the `languages` cache. The function // takes a key and optionally values. If not in the browser and no values @@ -1170,7 +1171,7 @@ ************************************/ - moment.fn = Moment.prototype = { + extend(moment.fn = Moment.prototype, { clone : function () { return moment(this); @@ -1526,7 +1527,7 @@ return this; } } - }; + }); // helper for adding shortcuts function makeGetterAndSetter(name, key) { @@ -1564,7 +1565,8 @@ ************************************/ - moment.duration.fn = Duration.prototype = { + extend(moment.duration.fn = Duration.prototype, { + _bubble : function () { var milliseconds = this._milliseconds, days = this._days, @@ -1653,7 +1655,7 @@ }, lang : moment.fn.lang - }; + }); function makeDurationGetter(name) { moment.duration.fn[name] = function () { -- 2.47.2