From: Iskren Chernev Date: Fri, 28 Nov 2014 06:32:13 +0000 (-0800) Subject: Remove zone from comments X-Git-Tag: 2.9.0~23^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4b9a7161ff8cb7cac831041f265816f28c415bf;p=thirdparty%2Fmoment.git Remove zone from comments --- diff --git a/moment.js b/moment.js index c1eba2fa2..747ab7fe4 100644 --- a/moment.js +++ b/moment.js @@ -782,7 +782,8 @@ return locales[name]; } - // Return a moment from input, that is local/utc/zone equivalent to model. + // Return a moment from input, that is local/utc/utcOffset equivalent to + // model. function makeAs(input, model) { var res, diff; if (model._isUTC) { @@ -1410,7 +1411,7 @@ } config._d = (config._useUTC ? makeUTCDate : makeDate).apply(null, input); - // Apply timezone offset from input. The actual zone can be changed + // Apply timezone offset from input. The actual utcOffset can be changed // with parseZone. if (config._tzm != null) { config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); @@ -2266,7 +2267,8 @@ calendar : function (time) { // We want to compare the start of today, vs this. - // Getting start-of-today depends on whether we're zone'd or not. + // Getting start-of-today depends on whether we're locat/utc/offset + // or not. var now = time || moment(), sod = makeAs(now, this).startOf('day'), diff = this.diff(sod, 'days', true), @@ -2426,8 +2428,8 @@ ), // keepLocalTime = true means only change the timezone, without - // affecting the local hour. So 5:31:26 +0300 --[zone(2, true)]--> - // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist int zone + // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]--> + // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset // +0200, so we adjust the time as needed, to be valid. // // Keeping the time actually adds/subtracts (one hour)