Skip to the content

Koyomi Calendars暦

Calendar pages as SVG: a day as an icon in 18 original designs, a whole month as a poster or a desk pad, and the page turning from one day to the next.

Koyomi is the Japanese word 暦 for the calendar. About the name

Contents

Reference · Calendar icons

calendarWeekendfunction

The Saturday and the Sunday of the weekend a date is in.

The Sunday may be in the next month or year.

Import it

import { calendarWeekend } from "@johnmorrisdotca/koyomi-calendars";

Definition

function calendarWeekend(year: number, month: number, day: number): { saturday: CalendarDate; sunday: CalendarDate; } | null

Parameters

NameTypeDescription
yearnumber

Four-digit year.

monthnumber

Month 1 to 12.

daynumber

Day of the month.

Returns

{ saturday: CalendarDate; sunday: CalendarDate; } | null

The two days, or null for a weekday, a day the month does not have, or a weekend that runs outside years 1 to 9999.

Examples

import { calendarWeekend } from "@johnmorrisdotca/koyomi-calendars";

console.log(calendarWeekend(2026, 11, 7));
console.log(calendarWeekend(2026, 11, 4));
{
  saturday: { year: 2026, month: 11, day: 7 },
  sunday: { year: 2026, month: 11, day: 8 }
}
null

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/koyomi-calendars 0.3.0.