ForHosting KIT · Dates & time

ISO weekday number

Enter a date and get its ISO weekday number, from 1 for Monday to 7 for Sunday: 2026-07-25 is a Saturday, so the answer is 6. The weekday name and the steps behind it come along. 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
2026-07-25
You get
Year
2,026
Month
7
Day
25
Iso weekday
6

An ISO weekday number answers a precise question that engineers and standards-minded planners ask every day: given a calendar date, which integer from one through seven does ISO 8601 assign to that weekday? Paste a year-month-day string such as twenty twenty-six dash zero seven dash twenty-five, and this tool returns the ISO weekday number where Monday is one, Tuesday is two, and Sunday is seven, plus a short English weekday name and an ordered list of arithmetic steps.

What ISO weekday numbering means and why it differs from Sunday-origin systems

ISO 8601 defines the weekday number as an integer from one through seven with Monday as the first day of the week and Sunday as the seventh. That convention underpins ISO week dates, many European business calendars, and countless APIs that store day-of-week as a machine-friendly code rather than a localized name. It is not the same as JavaScript Date getDay, which returns zero for Sunday through six for Saturday, nor the same as systems that treat Sunday as day one.

When you need the ISO number specifically—for example to build an ISO week-date string, to compare against a database column that stores one through seven, or to validate that a meeting series always falls on weekday number five—you want a calculator that never confuses the two conventions. This capability accepts a single ISO calendar date written as four digits, hyphen, two digits, hyphen, two digits, validates that the day exists on the proleptic Gregorian calendar, and maps the date to the ISO weekday number using Sakamoto’s compact integer formula.

Leap years follow the usual rule: years divisible by four are leap years except century years that are not divisible by four hundred.

Practical tips, limits, edge cases, and related searches

Always send a pure calendar date without a time component, fractional seconds, or a trailing Z; extended timestamps are rejected so timezone midnights cannot shift the civil day. Keep a small known set for tests: a mid-week date, a Sunday that must return seven, a Monday that must return one, a valid leap-day such as twenty twenty-four dash zero two dash twenty-nine, and a deliberate failure such as twenty twenty-three dash zero two dash twenty-nine.

Year bounds stop at nine thousand nine hundred ninety-nine so four-digit ISO strings remain well defined for this product surface. Round-trip checks are straightforward: recompute the weekday with another trusted Gregorian source and confirm that Monday maps to one and Sunday to seven. This landing targets people searching for ISO weekday number, ISO 8601 day of week one through seven, or Monday equals one Sunday equals seven from an ISO date.

It is not a business-day counter, not a locale-aware formatter, and not an age or interval tool.

Homework and standards exercises

Students and trainers confirm the ISO weekday integer for textbook dates and compare it against Sunday-origin systems that use zero through six.

What date format do I need?

A single ISO calendar date as YYYY-MM-DD (for example 2026-07-25). Datetimes, ordinal dates, and week dates are not accepted.

What happens with an invalid date like 2023-02-29?

Invalid months, zero days, and non YYYY-MM-DD shapes are also rejected.

Is Sunday 7 or 0 in ISO numbering?

Sunday is 7. ISO counts Monday as 1 through Sunday as 7, unlike software that numbers Sunday as 0 and Saturday as 6, or systems that start the week with Sunday as day 1.

Can I paste a date with a time attached?

No. Enter only the calendar date, without a time or a time zone mark. A time could push the day across midnight in another zone, so it is refused rather than risk the wrong weekday.

Does the result say whether the year is a leap year?

Yes. Next to the weekday number and its name you see whether the year is a leap year, plus a short list of the steps used, so February 29 of a leap year is accepted and checked like any other day.

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/iso-weekday-number

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/iso-weekday-number \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"date":"2026-07-25"}'
{
  "date": "2026-07-25"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "date.iso_weekday_number",
  "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.

year_min1
year_max9999
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.

Invalid shapes, impossible months, and a twenty-ninth of February outside a leap year are rejected with invalid_input instead of a silent wrong answer.

What ISO weekday numbering means and why it differs from Sunday-origin systems

The response echoes the canonical date and the numeric year, month, and day so callers can log both the input and the derived code without re-parsing.

How to call the API and what the response contains

The string must match YYYY-MM-DD exactly and must represent a real day in the inclusive year range from one through nine thousand nine hundred ninety-nine. Send a JSON body with one required string field named date. The same value may arrive under the aliases iso_date, value, or day for form compatibility. On success the payload includes date as the canonical string, year, month, and day as integers, iso_weekday and weekday_number set to the same integer from one through seven, weekday_name as the English long label aligned with that number, leap_year as a boolean, a human message, and a steps array that restates the parse and classification. Failed validation—missing field, wrong type, bad shape, out-of-range year, impossible month or day, or a non-leap twenty-ninth of February—returns invalid_input and is never charged. Pricing is a flat $0.002 per successful request with unit item and zero marginal unit price. Prefer this endpoint when the primary product of the call is the ISO number itself; if you mainly need a long weekday name for prose, a broader day-of-week calculator may fit better, but both stay consistent on Monday-through-Sunday numbering.

Practical tips, limits, edge cases, and related searches

Failed tasks that return invalid_input do not consume prepaid balance, which keeps exploratory scripts cheap when learners deliberately send bad dates. When integrating, store iso_weekday as an integer column and treat weekday_name as display-only English convenience text that Nitro landing pages may translate in prose while the numeric contract stays stable.

ISO week and scheduler fixtures

Backend teams generate known Monday=1…Sunday=7 fixtures for ISO week pipelines and calendar UIs without depending on the host clock or timezone.

Database and API contract checks

Engineers verify that stored weekday codes match ISO 8601 numbering when only an ISO date stamp is available from a form or import file.

How is the ISO weekday number defined?

Monday = 1, Tuesday = 2, Wednesday = 3, Thursday = 4, Friday = 5, Saturday = 6, Sunday = 7, per ISO 8601.

Does the result depend on my timezone?

No. The solver uses pure Gregorian arithmetic and never reads the host clock or Date timezone, so browser and API agree.

How much does the ISO weekday number API cost?

Successful requests are priced at a flat $0.002 per item. Failed validation (invalid_input) is not charged. The browser runner is free.

Read the full KIT documentation →