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) {
}
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);
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),
),
// 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)