Skip to content

Commit

Permalink
Changing to else if
Browse files Browse the repository at this point in the history
  • Loading branch information
laoneo committed Jun 25, 2019
1 parent bba0b3a commit c61ad1d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/core/datelib/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ export class DateEnv {
this.weekDow = settings.locale.week.dow
this.weekDoy = settings.locale.week.doy

if (settings.weekNumberCalculation === 'ISO') {
this.weekDow = 1
this.weekDoy = 4
}
if (typeof settings.firstDay === 'number') {
this.weekDow = settings.firstDay
}
else if (settings.weekNumberCalculation === 'ISO') {
this.weekDow = 1
this.weekDoy = 4
}

if (typeof settings.weekNumberCalculation === 'function') {
this.weekNumberFunc = settings.weekNumberCalculation
Expand Down

0 comments on commit c61ad1d

Please sign in to comment.