Skip to content

Commit

Permalink
Merge pull request #62 from xx45/dev
Browse files Browse the repository at this point in the history
fix(bug): fix endOf month
  • Loading branch information
iamkun authored Apr 26, 2018
2 parents dbe15c2 + 89b0f46 commit ec1686e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class Dayjs {
const instanceFactorySet = (method, slice) => {
const argumentStart = [0, 0, 0, 0]
const argumentEnd = [23, 59, 59, 999]
return new Dayjs(Date()[method].apply(
return new Dayjs(this.toDate()[method].apply( // eslint-disable-line prefer-spread
this.toDate(),
isStartOf ? argumentStart.slice(slice) : argumentEnd.slice(slice)
))
Expand Down

0 comments on commit ec1686e

Please sign in to comment.