]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Moment, Duration and Language objects now have constructor property 982/head
authorIskren Chernev <iskren.chernev@gmail.com>
Wed, 7 Aug 2013 06:27:10 +0000 (23:27 -0700)
committerIskren Chernev <iskren.chernev@gmail.com>
Wed, 7 Aug 2013 06:27:10 +0000 (23:27 -0700)
moment.js

index 2c1bf2c8e6607d2130029b93465a9019f14e8aad..3f9594ad1b5323912cbf4f48a42a4d1d1a487084 100644 (file)
--- a/moment.js
+++ b/moment.js
     ************************************/
 
 
-    Language.prototype = {
+    extend(Language.prototype, {
+
         set : function (config) {
             var prop, i;
             for (i in config) {
             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
     ************************************/
 
 
-    moment.fn = Moment.prototype = {
+    extend(moment.fn = Moment.prototype, {
 
         clone : function () {
             return moment(this);
                 return this;
             }
         }
-    };
+    });
 
     // helper for adding shortcuts
     function makeGetterAndSetter(name, key) {
     ************************************/
 
 
-    moment.duration.fn = Duration.prototype = {
+    extend(moment.duration.fn = Duration.prototype, {
+
         _bubble : function () {
             var milliseconds = this._milliseconds,
                 days = this._days,
         },
 
         lang : moment.fn.lang
-    };
+    });
 
     function makeDurationGetter(name) {
         moment.duration.fn[name] = function () {