|
|
@ -245,6 +245,11 @@ TimeStep.prototype.next = function() { |
|
|
|
this.current = this._end.clone(); |
|
|
|
} |
|
|
|
|
|
|
|
// Reset switches for year, month and day. Will get set to true where appropriate in DateUtil.stepOverHiddenDates
|
|
|
|
this.switchedDay = false; |
|
|
|
this.switchedMonth = false; |
|
|
|
this.switchedYear = false; |
|
|
|
|
|
|
|
DateUtil.stepOverHiddenDates(this.moment, this, prev); |
|
|
|
}; |
|
|
|
|
|
|
@ -443,7 +448,7 @@ TimeStep.snap = function(date, scale, step) { |
|
|
|
var _step = step > 5 ? step / 2 : 1; |
|
|
|
clone.milliseconds(Math.round(clone.milliseconds() / _step) * _step); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return clone; |
|
|
|
}; |
|
|
|
|
|
|
@ -454,7 +459,6 @@ TimeStep.snap = function(date, scale, step) { |
|
|
|
*/ |
|
|
|
TimeStep.prototype.isMajor = function() { |
|
|
|
if (this.switchedYear == true) { |
|
|
|
this.switchedYear = false; |
|
|
|
switch (this.scale) { |
|
|
|
case 'year': |
|
|
|
case 'month': |
|
|
@ -470,7 +474,6 @@ TimeStep.prototype.isMajor = function() { |
|
|
|
} |
|
|
|
} |
|
|
|
else if (this.switchedMonth == true) { |
|
|
|
this.switchedMonth = false; |
|
|
|
switch (this.scale) { |
|
|
|
case 'weekday': |
|
|
|
case 'day': |
|
|
@ -484,7 +487,6 @@ TimeStep.prototype.isMajor = function() { |
|
|
|
} |
|
|
|
} |
|
|
|
else if (this.switchedDay == true) { |
|
|
|
this.switchedDay = false; |
|
|
|
switch (this.scale) { |
|
|
|
case 'millisecond': |
|
|
|
case 'second': |
|
|
|