From 94057c3d02734a25ebb0b17e46120a2d40f5efd4 Mon Sep 17 00:00:00 2001 From: Sanjay Achar Date: Mon, 25 Mar 2024 15:31:37 +0530 Subject: [PATCH] Fixing Issue #2607 --- src/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 061ade178..7afec08b7 100644 --- a/src/index.js +++ b/src/index.js @@ -113,7 +113,12 @@ class Dayjs { } isValid() { - return !(this.$d.toString() === C.INVALID_DATE_STRING) + switch (this.$D !== this.$d.getDate()) { + case true: + return !(this.$d.toString() === C.INVALID_DATE_STRING) + default: + return false + } } isSame(that, units) {