Skip to content

Commit 72488dd

Browse files
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.
1 parent 5aa273c commit 72488dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/plugin/calendar.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ var calendar = require("dayjs/plugin/calendar");
1111

1212
dayjs.extend(calendar);
1313

14-
dayjs().calendar(dayjs("2008-01-01"));
14+
dayjs("2008-01-01").calendar();
1515
dayjs().calendar(null, {
1616
sameDay: "[Today at] h:mm A", // The same day ( Today at 2:30 AM )
1717
nextDay: "[Tomorrow at] h:mm A", // The next day ( Tomorrow at 2:30 AM )

0 commit comments

Comments
 (0)