Next occurrence of a weekday
From Friday 15 March 2024, the next Monday is 18 March 2024, three days later. Pick a date and a weekday to get the soonest matching day on or after it, handy for weekly reports and meetings. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Date
- 2024-03-15
- Target weekday name
- Monday
- Result
- 2024-03-18
- Days until
- 3
- Base weekday
- Friday
- Base weekday iso
- 5
This next-occurrence-of-a-weekday calculator takes a single Gregorian calendar date in YYYY-MM-DD form and a target weekday name in English, then returns the soonest calendar day on or after the base that falls on that weekday. Classic checks include 2024-03-15 (a Friday) plus Monday landing on 2024-03-18 three days later, the same Friday base plus Friday returning the base itself with zero days until, and a Sunday base plus Wednesday rolling forward three whole days without timezone noise. The engine uses only deterministic proleptic Gregorian arithmetic: it validates that the base day actually exists on the calendar, maps the weekday token through a fixed English name table, computes the day of week with Sakamoto integer arithmetic, applies modular days-until, and converts through a serial day count without network calls, random sampling, or the host clock.
Where next-weekday arithmetic fits in scheduling, planning, and software
Operations and product teams need the next named weekday when a report always ships on Friday, when a meeting series must land on the next Tuesday after a kickoff stamp, or when a compliance window is defined as the first Monday on or after a filing date rather than a floating timezone wall clock. Analysts building cohort labels use the same move to align observation starts to a fixed day of week so weekly metrics line up without off-by-one errors at year boundaries and leap days.
Developers call the contract from scripts to generate deterministic test vectors for schedulers and cron-like helpers, to seed demo calendars for onboarding flows, or to satisfy product requirements that demand a pure calendar step without host locale week starts. Pair it with epoch conversion, day subtraction, or ISO week helpers when you need related calendar steps, and with other free deterministic tools when you are assembling a small lab of date utilities.
What you can do with it
Weekly report and meeting alignment
Find the next Monday or Friday on or after a kickoff date so reports, standups, and shipping cadences land on a fixed weekday without timezone drift.
Compliance and filing windows
Compute the first named weekday on or after a statutory base date for notices, cutoffs, and calendar-driven policy rules.
FAQ
What does the next-occurrence-of-a-weekday calculator cost?
It is free in your browser on this page.
Which weekday names are accepted?
English full names Monday through Sunday and common abbreviations Mon, Tue/Tues, Wed, Thu/Thur/Thurs, Fri, Sat, Sun. Matching is case-insensitive.
Does this skip weekends or holidays?
No. It only advances whole Gregorian calendar days to the named weekday. Use a business-day tool if you need holiday calendars.
What date formats are accepted?
Month lengths and leap days are validated; years from 1 to 9999 are supported.
What if my date already falls on the weekday I picked?
Then the answer is that same date, with zero days to wait. Picking Friday for Friday 15 March 2024 returns 15 March 2024; only a different weekday moves the date forward.
Related tools
For developers — API access
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.
API endpoint
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.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/date/next-weekday \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"date":"2024-03-15","weekday":"Monday"}'const res = await fetch("https://api.kit.forhosting.com/date/next-weekday", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"date": "2024-03-15",
"weekday": "Monday"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/date/next-weekday",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"date": "2024-03-15",
"weekday": "Monday"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/date/next-weekday", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"date":"2024-03-15","weekday":"Monday"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"date":"2024-03-15","weekday":"Monday"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/date/next-weekday", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"date": "2024-03-15",
"weekday": "Monday"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "date.next_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.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
year_min | 1 |
year_max | 9999 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
What next-weekday means and what the response contains
Finding the next occurrence of a weekday answers a different question from counting business days or formatting locale strings: it walks forward on the Gregorian civil calendar, one midnight at a time, until the target named day of week is reached, without skipping holidays or depending on the local week-start convention. You supply a base date as a strict YYYY-MM-DD string and a weekday field with an English full name such as Monday or a common abbreviation such as Mon, Fri, or Thu; the engine normalizes case and token form against a fixed map and rejects anything it does not recognize. If you need business-day offsets, epoch conversion, multi-format parsing, or ISO week numbers, use those dedicated tools; this page answers only the soonest on-or-after Gregorian date for a named weekday. On-or-after semantics mean that if the base already lands on the requested weekday, days_until is zero and result equals the base date; otherwise days_until is the whole-day distance from one through six to the next matching day. The calculator returns the normalized base date, the canonical weekday name used, the result ISO string, days_until, the base weekday name and ISO weekday number Monday equals one through Sunday equals seven, the same pair for the result, the result year month and day fields, the base components for easy piping, and a short formula reminder. Rejected cases include a missing date or weekday field, wrong shapes such as 2024/03/15, impossible months, days that do not exist such as 2023-02-29, and unrecognized weekday strings such as Funday or numeric codes.
How the date and weekday are read and how the result stays reproducible
The string must match four digits, a hyphen, two digits, another hyphen, and two digits; leading or trailing spaces are trimmed, but partial dates, ordinal day-of-year alone, and month names are not expanded here. After parsing, the year must fall between 1 and 9999, the month between 1 and 12, and the day between 1 and the true length of that month in that year, with leap years following the Gregorian rule of divisible by four except century years not divisible by four hundred. The preferred base field is date, but aliases iso_date, d, value, base, and from are accepted so spreadsheets, query strings, and typed forms can reuse the same contract without renaming columns. The weekday field, with aliases day, dow, target, and target_weekday, must be an English full name or a common abbreviation from the documented set; tokens are lowercased and looked up in a static map from Sunday through Saturday, while pure numbers and invented labels are rejected with a clear message so a bad cell does not become a wrong next day. Internally the engine obtains the base day of week with Sakamoto pure-integer arithmetic, computes days_until as the modular distance to the target on a seven-day cycle, converts the civil triple to a proleptic Gregorian serial day count using the well-known days_from_civil mapping, adds the integer offset, then recovers year, month, and day with civil_from_days. Pair the free browser run on this page with the priced API when you need the identical next weekday inside an automated pipeline.
Where next-weekday arithmetic fits in scheduling, planning, and software
On this page the work runs entirely in your browser; through the API each successful lookup costs $0.002, failed validation is not charged, and nothing is stored after the response returns. That split — free interactive exploration and a priced, identical API — matches the rest of the KIT tier-A catalog and lets you move from a one-off check to a pipeline without changing the mathematical result.
Integration use cases
Deterministic test fixtures
Generate reproducible next-weekday ISO strings for unit tests, property checks, and CI assertions without depending on Date or the host clock.
Technical questions
If the base date is already the target weekday, what is returned?
The base date itself. Semantics are on-or-after: days_until is 0 and result equals the normalized input date.