From e3b69589b20cf4f769fdc3a59df0dbeda095654e Mon Sep 17 00:00:00 2001 From: Danial Soheili Date: Sat, 28 Jan 2023 11:16:24 +0330 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20FIX:=20endOf=20if=20leapYear?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jalali-moment.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jalali-moment.js b/jalali-moment.js index ccb0ad2..a6a4741 100644 --- a/jalali-moment.js +++ b/jalali-moment.js @@ -944,7 +944,7 @@ jMoment.fn.endOf = function (units) { if (units === undefined || units === "milisecond") { return this; } - return this.startOf(units).add(1, units).subtract(1, "ms"); + return this.add(1, units).startOf(units).subtract(1, "ms"); }; jMoment.fn.isSame = function (other, units) {