Skip to content

Commit

Permalink
chore: code update
Browse files Browse the repository at this point in the history
  • Loading branch information
iamkun committed May 21, 2018
1 parent e11ba0e commit 7e63e20
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -375,13 +375,10 @@ class Dayjs {
return Ls[this.$L]
}

$setLocale(preset, object) { // private set locale mutate instance
this.$L = parseLocale(preset, object, true)
return this
}

locale(preset, object) {
return this.clone().$setLocale(preset, object)
const that = this.clone()
that.$L = parseLocale(preset, object, true)
return that
}

clone() {
Expand Down

0 comments on commit 7e63e20

Please sign in to comment.