From a8967b265707000f87d28e76e6e9d4eb1ab9d5a1 Mon Sep 17 00:00:00 2001 From: iamkun Date: Thu, 26 Apr 2018 09:33:42 +0800 Subject: [PATCH 1/2] fix(bug): fix endOf month close #61 --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index c8ba41752..d01a0f8eb 100644 --- a/src/index.js +++ b/src/index.js @@ -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( this.toDate(), isStartOf ? argumentStart.slice(slice) : argumentEnd.slice(slice) )) From 89b0f469d02faf7f68c9aa3d61ebf0290bb28283 Mon Sep 17 00:00:00 2001 From: iamkun Date: Thu, 26 Apr 2018 09:41:54 +0800 Subject: [PATCH 2/2] chore: --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index d01a0f8eb..a2aaebdba 100644 --- a/src/index.js +++ b/src/index.js @@ -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(this.toDate()[method].apply( + return new Dayjs(this.toDate()[method].apply( // eslint-disable-line prefer-spread this.toDate(), isStartOf ? argumentStart.slice(slice) : argumentEnd.slice(slice) ))