ForHosting KIT · Dates & time

Doomsday rule calculator

4 July 2024 was a Thursday, and so was that year's doomsday, shared by easy dates like 4 April, 6 June and 12 December. Enter any calendar date to get its weekday plus the year anchor, century anchor and memorable date used. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Date
2024-07-04
You get
Year
2,024
Month
7
Day
4
Month name
July

John Conway's Doomsday rule is a mental algorithm that finds the weekday of any Gregorian calendar date by first locating the year's anchor day—the so-called doomsday that falls on memorable dates such as April fourth, June sixth, and December twelfth—and then offsetting from that anchor to the day you care about. This doomsday rule calculator applies the same century-anchor and year-offset arithmetic deterministically, so students, tutors, and pipelines get a structured weekday answer without installing calendar libraries or trusting the host clock. Send a single ISO date string such as twenty twenty-four dash zero seven dash zero four; the response names the weekday, reports Conway's zero-through-six index, the year's anchor day, the century anchor, and the month doomsday day used in the offset. Impossible calendar dates like a non-leap February twenty-ninth fail with a clear invalid input error.

ISO date input and Gregorian calendar validation

Provide the required field date as an ISO calendar string YYYY-MM-DD with a four-digit year, a two-digit month from zero one through one two, and a two-digit day that actually exists in that month under the Gregorian calendar. The engine rejects format mismatches that are not four-plus-two-plus-two digits separated by hyphens, months outside one through twelve, and day numbers that exceed the length of the month—including February twenty-nine in common years and day thirty-one in short months.

Leap years follow the standard rule: divisible by four, except century years must also be divisible by four hundred, which is why the year two thousand is a leap year while nineteen hundred is not. Year bounds follow the published civil range for isolate safety and everyday historical or planning use.

Classroom Doomsday practice

Teachers and students verify weekday answers and compare the returned anchor day and century anchor against hand calculations using Conway's memorable dates.

What is the anchor day (doomsday) in the response?

The calculator offsets from that anchor to your day.

What happens if the date is not a valid calendar day?

Examples include 2023-02-29 in a non-leap year, month 13, or day 31 in April. Invalid inputs are not charged.

Is the doomsday rule calculator free?

The browser tool runs free on your device.

How does the Doomsday rule find a weekday?

Every year has an anchor weekday shared by easy dates such as 4 April, 6 June and 12 December. In 2024 that anchor is Thursday, and since 11 July is also a doomsday, 4 July 2024 is a Thursday too.

What do the weekday numbers in the result mean?

Conway's index runs from 0 for Sunday to 6 for Saturday. The result also gives the ISO number, where Monday is 1 and Sunday is 7, so 4 July 2024 shows 4 on both scales.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/date/doomsday-weekday

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/date/doomsday-weekday \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"date":"2024-07-04"}'
{
  "date": "2024-07-04"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "date.doomsday_weekday",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

ISO date input and Gregorian calendar validation

Aliases d, iso, and iso_date are accepted when documented so clients can map common field names without renaming payloads. Missing date, empty strings, non-string types, and impossible calendar days raise invalid_input and are not charged after the engine rejects the request.

Reading the Doomsday response: weekday, anchors, and offsets

On success the response echoes the normalized date, year, month, day, and English month_name for display. The weekday string is the English day name from Sunday through Saturday, and weekday_index follows Conway's convention with zero for Sunday through six for Saturday. The iso_weekday field maps the same day to the ISO-8601 scale where one is Monday and seven is Sunday, so pipelines that already use ISO week numbering can consume either index without re-deriving the mapping. The heart of the educational contract is the year's anchor: anchor_day and anchor_index name the doomsday weekday for that year, while century_anchor and century_anchor_index show the century base before the year offset is applied, and year_offset reports the modular contribution of the two-digit year. The month_doomsday integer is the memorable day-of-month used for the offset (for example eleven in July, or four in January of a leap year), and is_leap_year flags whether January and February used the leap memorable dates. Fields calendar and method are always gregorian and conway_doomsday so tests and routers branch on stable labels. Use weekday alone for display; use anchor_day when teaching the rule step by step; combine century_anchor with year_offset when grading student work that must show intermediate Conway steps.

API usage, pricing, classroom workflows, and practical limits

Keep inputs to real Gregorian calendar days—the product rejects invalid dates rather than rolling them over—so bad form values surface early. Send a JSON body with the required ISO date string and call the free in-browser doomsday rule calculator for homework checks, lecture demos, and mental-math practice without installing date libraries. Use the prepaid API when a tutoring platform, exam sandbox, history tool, or scheduling assistant needs a stable weekday contract under KIT balance at $0.002 per successful item; validation failures never consume balance after the engine rejects the payload. Pair this endpoint with month-length or ordinal-date tools when the next step is validating a form date or converting day-of-year, and with week-number calculators when you already know the weekday and need ISO week placement. Authors shipping SDKs can map weekday and anchor_day into side-by-side teaching tables that show how Conway's memorable dates connect the year's doomsday to the target day.

Tutoring and exam sandboxes

Tutoring apps grade weekday questions with structured JSON, showing intermediate anchor fields when a student must demonstrate the full Doomsday steps.

History and schedule tools

Pipelines that need the weekday of a civil ISO date without host Date quirks call a deterministic prepaid endpoint for fixtures and UI labels.

How do I find the weekday of a date with the Doomsday rule calculator?

Send JSON with date set to an ISO string such as 2024-07-04. The response includes weekday, weekday_index, the year's anchor_day, and the century_anchor used by Conway's method.

Does the engine use the host Date object or my time zone?

No. The path is pure Gregorian integer arithmetic with Conway century and year formulas. Results do not depend on time zone, locale, or wall-clock time.

Read the full KIT documentation →