From 72488dd81386635f7c84bb682aafe6e33a5fb742 Mon Sep 17 00:00:00 2001 From: James <74307590+GetNameSniped@users.noreply.github.com> Date: Tue, 3 Sep 2024 21:26:55 +0200 Subject: [PATCH] Fix calendar ref which was causing issues This reference to the calendar function causes issues in many cases. If you feed the function an epoch date (ms), it would spit out the calendar date of the current time. This simple change fixes that issue and many others. --- docs/plugin/calendar.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/plugin/calendar.md b/docs/plugin/calendar.md index 7cc36edff..466011fc2 100644 --- a/docs/plugin/calendar.md +++ b/docs/plugin/calendar.md @@ -11,7 +11,7 @@ var calendar = require("dayjs/plugin/calendar"); dayjs.extend(calendar); -dayjs().calendar(dayjs("2008-01-01")); +dayjs("2008-01-01").calendar(); dayjs().calendar(null, { sameDay: "[Today at] h:mm A", // The same day ( Today at 2:30 AM ) nextDay: "[Tomorrow at] h:mm A", // The next day ( Tomorrow at 2:30 AM )