Skip to content

Commit

Permalink
Code review change: use break consistenly
Browse files Browse the repository at this point in the history
  • Loading branch information
ashsearle committed Dec 22, 2017
1 parent a8e9fb1 commit b216273
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/lib/moment/start-end-of.js
Expand Up @@ -61,16 +61,16 @@ export function startOf (units) {
break;
case 'hour':
time = this._d.valueOf();
time = (time - mod(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR));
time -= mod(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR);
break;
case 'minute':
time = this._d.valueOf();
this._d.setTime(time - mod(time, MS_PER_MINUTE));
return this;
time -= mod(time, MS_PER_MINUTE);
break;
case 'second':
time = this._d.valueOf();
this._d.setTime(time - mod(time, MS_PER_SECOND));
return this;
time -= mod(time, MS_PER_SECOND);
break;
}

this._d.setTime(time);
Expand Down Expand Up @@ -109,16 +109,16 @@ export function endOf (units) {
break;
case 'hour':
time = this._d.valueOf();
time = (time - mod(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR) + MS_PER_HOUR - 1);
time += MS_PER_HOUR - mod(time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), MS_PER_HOUR) - 1;
break;
case 'minute':
time = this._d.valueOf();
this._d.setTime(time - mod(time, MS_PER_MINUTE) + MS_PER_MINUTE - 1);
return this;
time += MS_PER_MINUTE - mod(time, MS_PER_MINUTE) - 1;
break;
case 'second':
time = this._d.valueOf();
this._d.setTime(time - mod(time, MS_PER_SECOND) + MS_PER_SECOND - 1);
return this;
time += MS_PER_SECOND - mod(time, MS_PER_SECOND) - 1;
break;
}

this._d.setTime(time);
Expand Down

0 comments on commit b216273

Please sign in to comment.