Week Number API
Overview
The WhatWeek API returns week numbers, week date ranges, ISO week notation, and related calendar metadata for a given date.
Responses are small JSON objects unless an endpoint returns a calendar export. Dates use YYYY-MM-DD. Supported week systems are
iso and us. The public holiday endpoint is a third-party fallback and is not treated as official
government-verified holiday data.
GET /api/week
GET /api/week?date=2026-05-03&system=iso&timezone=Asia/Singapore curl "https://whatweek.is/api/week?date=2026-05-03&system=iso&timezone=Asia/Singapore" const response = await fetch(
'https://whatweek.is/api/week?date=2026-05-03&system=iso&timezone=Asia/Singapore'
);
const week = await response.json();
console.log(week.iso); import requests
response = requests.get(
"https://whatweek.is/api/week",
params={
"date": "2026-05-03",
"system": "iso",
"timezone": "Asia/Singapore",
},
)
print(response.json()["iso"])
Excel and Google Sheets can call the JSON endpoint for lightweight lookups. In Excel, use WEBSERVICE with the API URL,
then parse the returned JSON with your preferred workbook method. In Google Sheets, use Apps Script for JSON responses or
IMPORTDATA for the CSV calendar export.
{
"date": "2026-05-03",
"timezone": "Asia/Singapore",
"system": "iso",
"weekYear": 2026,
"weekNumber": 18,
"iso": "2026-W18-7",
"weekStarts": "2026-04-27",
"weekEnds": "2026-05-03",
"dayOfYear": 123,
"quarter": 2,
"weeksInYear": 53,
"weeksRemaining": 35,
"businessDays": 5,
"weekendDays": 2
}
The businessDays and weekendDays fields in week responses are plain weekday and weekend counts.
They are not country holiday-aware business calendars.
GET /api/current-week
GET /api/current-week?timezone=Asia/Singapore&system=iso curl "https://whatweek.is/api/current-week?timezone=Asia/Singapore&system=iso" GET /api/week-to-date
GET /api/week-to-date?year=2026&week=53&system=iso {
"year": 2026,
"week": 53,
"system": "iso",
"weekStarts": "2026-12-28",
"weekEnds": "2027-01-03",
"days": [
{ "date": "2026-12-28", "weekday": 1, "name": "Monday", "isWeekend": false },
{ "date": "2026-12-29", "weekday": 2, "name": "Tuesday", "isWeekend": false },
{ "date": "2026-12-30", "weekday": 3, "name": "Wednesday", "isWeekend": false },
{ "date": "2026-12-31", "weekday": 4, "name": "Thursday", "isWeekend": false },
{ "date": "2027-01-01", "weekday": 5, "name": "Friday", "isWeekend": false },
{ "date": "2027-01-02", "weekday": 6, "name": "Saturday", "isWeekend": true },
{ "date": "2027-01-03", "weekday": 7, "name": "Sunday", "isWeekend": true }
],
"businessDays": 5,
"weekendDays": 2
}
The businessDays value here is a weekday count only. Use official holiday calendars before treating it as a real
country-specific business-day count.
GET /api/holidays
This endpoint uses verified 2026 government-source calendars for the first supported batch: AU, CA, CN, GB, IN, NZ, SG, and US.
Countries with regional rules may require region, such as GB-SCT or AU-NSW.
GET /api/holidays?country=SG&weekStarts=2026-04-27&weekEnds=2026-05-03 curl "https://whatweek.is/api/holidays?country=SG&weekStarts=2026-04-27&weekEnds=2026-05-03" {
"status": "available",
"countryCode": "SG",
"regionName": "National",
"sourceAuthority": "Singapore Ministry of Manpower",
"sourceUrl": "https://www.mom.gov.sg/newsroom/press-releases/2025/0616-public-holidays-for-2026",
"verification": "official",
"weekStarts": "2026-04-27",
"weekEnds": "2026-05-03",
"holidays": [
{
"date": "2026-05-01",
"localName": "Labour Day",
"name": "Labour Day",
"countryCode": "SG",
"type": "Public holiday"
}
],
"message": "Official holiday data is verified for Singapore 2026."
} Calendar exports
Use ICS for calendar imports and CSV for spreadsheet workflows.
GET /api/ics/week?year=2026&week=53&system=iso
GET /api/calendar/year.csv?year=2026 curl -L "https://whatweek.is/api/ics/week?year=2026&week=53&system=iso" -o whatweek-2026-W53.ics
curl -L "https://whatweek.is/api/calendar/year.csv?year=2026" -o whatweek-2026-calendar.csv
The ICS response uses text/calendar and includes one all-day event for the requested week. The CSV response uses
text/csv and lists the year calendar with week metadata.
CSV columns: year, week, system, weekStarts, weekEnds,
legacy weekday count fields businessDays and weekendDays. Open the downloaded CSV in Excel or Google Sheets to filter weeks,
build planning tables, or join week ranges to your own schedule data.
=IMPORTDATA("https://whatweek.is/api/calendar/year.csv?year=2026") Rate limits
No API key is required for the MVP public API. Public API routes are rate limited per client to reduce abusive traffic and keep the service responsive for normal use.
If a client sends too many requests in a short window, the API returns 429 Too Many Requests with a
Retry-After header. Wait for that many seconds before retrying.
Response schema
Week response:
{
"date": "YYYY-MM-DD",
"timezone": "IANA time zone",
"system": "iso | us",
"weekYear": "number",
"weekNumber": "number",
"iso": "YYYY-Www-d",
"weekStarts": "YYYY-MM-DD",
"weekEnds": "YYYY-MM-DD",
"dayOfYear": "number",
"quarter": "number",
"weeksInYear": "number",
"weeksRemaining": "number",
"businessDays": "number",
"weekendDays": "number"
}
Holiday response:
{
"status": "available | unavailable",
"countryCode": "AU | CA | CN | GB | IN | NZ | SG | US",
"regionCode": "optional region code",
"regionName": "optional region name",
"sourceAuthority": "official source name when available",
"sourceUrl": "official source URL when available",
"verification": "official | third-party | unverified",
"weekStarts": "YYYY-MM-DD",
"weekEnds": "YYYY-MM-DD",
"holidays": [
{
"date": "YYYY-MM-DD",
"localName": "string",
"name": "string",
"countryCode": "string",
"type": "Public holiday | Bank holiday | Partial public holiday | Observance | Regional holiday | School holiday"
}
],
"message": "string"
} Errors
GET /api/week?date=2026-99-99
{ "error": "Invalid date. Use YYYY-MM-DD." }
GET /api/week?date=2026-05-03&system=fiscal
{ "error": "Invalid week system. Use iso or us." }
GET /api/current-week?timezone=Not/AZone
{ "error": "Invalid timezone." }
GET /api/holidays?country=DE&weekStarts=2026-04-27&weekEnds=2026-05-03
{ "error": "Invalid country. Use AU, CA, CN, GB, IN, NZ, SG, or US." }
GET /api/week-to-date?year=2026&week=54&system=iso
{ "error": "Invalid week number." }