weekday-skip-days

Compute weekday indices while skipping intercalary and epagomenal days.

26|6|Updated Apr 14, 2024
One-click install
npx skills add https://github.com/CodapopKSP/LibraryOfTime --skill weekday-skip-days
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: weekday-skip-days
Source: https://github.com/CodapopKSP/LibraryOfTime/tree/main/.cursor/skills/weekday-skip-days
Command: npx skills add https://github.com/CodapopKSP/LibraryOfTime --skill weekday-skip-days

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Many calendar systems define a weekday cycle but also contain days that do not advance the weekday, such as intercalary or epagomenal days. Traditional calculations that simply use the raw day index produce incorrect weekdays when those skipped days are present.

Core Features & Use Cases

  • Classify which days are regular and which are skipped based on calendar rules.
  • Anchor the weekday using a known reference date or the start of the year.
  • Compute the number of regular days elapsed by subtracting skipped days from the total elapsed days.
  • Derive the weekday index from the regular‑day count and the anchor weekday.
  • Define a consistent display strategy for skipped days and validate edge cases, including leap years and negative years.

Quick Start

Ask the skill to determine the weekday for a target date by providing the anchor weekday index, the list of skipped day indexes, and the target day index.

Frequently Asked Questions about weekday-skip-days

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I calculate weekdays for a calendar that skips intercalary days?

To calculate weekdays skipping intercalary days, you must subtract skipped day indexes from the total elapsed days to find the regular days elapsed, then add the anchor weekday index and compute the result modulo seven.

Why does my weekday computation return incorrect dates when epagomenal days are present?

Weekday computation returns incorrect dates because raw day index calculations fail when skipped non-weekday days are present. You must classify regular and skipped days, then derive the weekday from the adjusted regular-day count.

What inputs do I need to compute a weekday while skipping intercalary days?

Computing a weekday while skipping intercalary days requires the anchor weekday index of a known reference date, the total elapsed days, and the set of skipped day indexes to determine the correct regular days elapsed.

How do leap years affect date computation in calendars with epagomenal days?

Leap years introduce additional intercalary days into the date computation cycle. The calculation must validate these edge cases by correctly identifying and subtracting all leap-year skipped day indexes before deriving the weekday modulo seven.

Does weekday calculation with skipped days work for negative year scenarios?

Yes, weekday calculation with skipped days works for negative year scenarios. The logic validates edge cases including negative years by consistently applying the skipped day subtraction to the total elapsed days before modulo arithmetic.