diff --git a/bower.json b/bower.json index fa01af90..9f0ab7d3 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "moment-timezone", "description" : "Parse and display moments in any timezone.", - "version": "0.2.0", + "version": "0.2.1", "main": "builds/moment-timezone-with-data-2010-2020.js", "dependencies" : { "moment" : ">= 2.6.0" diff --git a/builds/moment-timezone-with-data-2010-2020.js b/builds/moment-timezone-with-data-2010-2020.js index 438ec386..90d9091e 100644 --- a/builds/moment-timezone-with-data-2010-2020.js +++ b/builds/moment-timezone-with-data-2010-2020.js @@ -1,5 +1,5 @@ //! moment-timezone.js -//! version : 0.2.0 +//! version : 0.2.1 //! author : Tim Wood //! license : MIT //! github.com/moment/moment-timezone @@ -21,7 +21,7 @@ // Do not load moment-timezone a second time. if (moment.tz !== undefined) { return moment; } - var VERSION = "0.2.0", + var VERSION = "0.2.1", zones = {}, links = {}; @@ -302,7 +302,7 @@ out = moment.utc.apply(null, args); if (zone && needsOffset(out)) { - out.add('minutes', zone.parse(out)); + out.add(zone.parse(out), 'minutes'); } out.tz(name); @@ -369,7 +369,7 @@ function resetZoneWrap (old) { return function () { this._z = null; - return old.call(this); + return old.apply(this, arguments); }; } @@ -378,7 +378,15 @@ fn.utc = resetZoneWrap(fn.utc); // Cloning a moment should include the _z property. - moment.momentProperties._z = null; + var momentProperties = moment.momentProperties; + if (Object.prototype.toString.call(momentProperties) === '[object Array]') { + // moment 2.8.1+ + momentProperties.push('_z'); + momentProperties.push('_a'); + } else { + // moment 2.7.0 + momentProperties._z = null; + } loadData({ "version": "2014e", diff --git a/builds/moment-timezone-with-data-2010-2020.min.js b/builds/moment-timezone-with-data-2010-2020.min.js index 0cd47600..c4a80374 100644 --- a/builds/moment-timezone-with-data-2010-2020.min.js +++ b/builds/moment-timezone-with-data-2010-2020.min.js @@ -1,6 +1,6 @@ //! moment-timezone.js -//! version : 0.2.0 +//! version : 0.2.1 //! author : Tim Wood //! license : MIT //! github.com/moment/moment-timezone -!function(a,b){"use strict";"function"==typeof define&&define.amd?define(["moment"],b):"object"==typeof exports?module.exports=b(require("moment")):b(a.moment)}(this,function(a){"use strict";function b(a){return a>96?a-87:a>64?a-29:a-48}function c(a){var c,d=0,e=a.split("."),f=e[0],g=e[1]||"",h=1,i=0,j=1;for(45===a.charCodeAt(0)&&(d=1,j=-1),d;dc;c++)a[c]=Math.round((a[c-1]||0)+6e4*a[c]);a[b-1]=1/0}function f(a,b){var c,d=[];for(c=0;ce;e++)if(b=g[e],c=g[e+1],d=g[e?e-1:e],c>b&&u.moveAmbiguousForward?b=c:b>d&&u.moveInvalidForward&&(b=d),f96?a-87:a>64?a-29:a-48}function c(a){var c,d=0,e=a.split("."),f=e[0],g=e[1]||"",h=1,i=0,j=1;for(45===a.charCodeAt(0)&&(d=1,j=-1),d;dc;c++)a[c]=Math.round((a[c-1]||0)+6e4*a[c]);a[b-1]=1/0}function f(a,b){var c,d=[];for(c=0;ce;e++)if(b=g[e],c=g[e+1],d=g[e?e-1:e],c>b&&u.moveAmbiguousForward?b=c:b>d&&u.moveInvalidForward&&(b=d),f96?a-87:a>64?a-29:a-48}function c(a){var c,d=0,e=a.split("."),f=e[0],g=e[1]||"",h=1,i=0,j=1;for(45===a.charCodeAt(0)&&(d=1,j=-1),d;dc;c++)a[c]=Math.round((a[c-1]||0)+6e4*a[c]);a[b-1]=1/0}function f(a,b){var c,d=[];for(c=0;ce;e++)if(b=g[e],c=g[e+1],d=g[e?e-1:e],c>b&&u.moveAmbiguousForward?b=c:b>d&&u.moveInvalidForward&&(b=d),f96?a-87:a>64?a-29:a-48}function c(a){var c,d=0,e=a.split("."),f=e[0],g=e[1]||"",h=1,i=0,j=1;for(45===a.charCodeAt(0)&&(d=1,j=-1),d;dc;c++)a[c]=Math.round((a[c-1]||0)+6e4*a[c]);a[b-1]=1/0}function f(a,b){var c,d=[];for(c=0;ce;e++)if(b=g[e],c=g[e+1],d=g[e?e-1:e],c>b&&u.moveAmbiguousForward?b=c:b>d&&u.moveInvalidForward&&(b=d),f96?a-87:a>64?a-29:a-48}function c(a){var c,d=0,e=a.split("."),f=e[0],g=e[1]||"",h=1,i=0,j=1;for(45===a.charCodeAt(0)&&(d=1,j=-1),d;dc;c++)a[c]=Math.round((a[c-1]||0)+6e4*a[c]);a[b-1]=1/0}function f(a,b){var c,d=[];for(c=0;ce;e++)if(b=g[e],c=g[e+1],d=g[e?e-1:e],c>b&&u.moveAmbiguousForward?b=c:b>d&&u.moveInvalidForward&&(b=d),f96?a-87:a>64?a-29:a-48}function c(a){var c,d=0,e=a.split("."),f=e[0],g=e[1]||"",h=1,i=0,j=1;for(45===a.charCodeAt(0)&&(d=1,j=-1),d;dc;c++)a[c]=Math.round((a[c-1]||0)+6e4*a[c]);a[b-1]=1/0}function f(a,b){var c,d=[];for(c=0;ce;e++)if(b=g[e],c=g[e+1],d=g[e?e-1:e],c>b&&u.moveAmbiguousForward?b=c:b>d&&u.moveInvalidForward&&(b=d),f=2.6.0` as a dependency in `bower.json`. [#107](https://github.com/moment/moment-timezone/issues/107) @@ -44,4 +47,4 @@ * Added more links and timezone names in moment-timezone.json ### `0.0.1` _2013-07-17_ -* Initial version. \ No newline at end of file +* Initial version. diff --git a/moment-timezone-utils.js b/moment-timezone-utils.js index 93c20b49..59f737de 100644 --- a/moment-timezone-utils.js +++ b/moment-timezone-utils.js @@ -1,5 +1,5 @@ //! moment-timezone-utils.js -//! version : 0.2.0 +//! version : 0.2.1 //! author : Tim Wood //! license : MIT //! github.com/moment/moment-timezone diff --git a/moment-timezone.js b/moment-timezone.js index 0b87acc5..73ac13d3 100644 --- a/moment-timezone.js +++ b/moment-timezone.js @@ -1,5 +1,5 @@ //! moment-timezone.js -//! version : 0.2.0 +//! version : 0.2.1 //! author : Tim Wood //! license : MIT //! github.com/moment/moment-timezone @@ -21,7 +21,7 @@ // Do not load moment-timezone a second time. if (moment.tz !== undefined) { return moment; } - var VERSION = "0.2.0", + var VERSION = "0.2.1", zones = {}, links = {}; diff --git a/package.json b/package.json index 1189bf03..ffeb1e29 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "moment-timezone", - "version": "0.2.0", + "version": "0.2.1", "description": "Parse and display moments in any timezone.", "homepage": "http://momentjs.com/timezone/", "author": "Tim Wood (http://timwoodcreates.com/)",