Date & Time
Week of the month API
Determines which week of the month a date falls in under both the simple ceil(day/7) and the calendar (weekStartsOn-aligned) conventions, plus the nth-occurrence of its weekday and total weeks. Answers 'Which week of the month is this date?', 'Is this the last week of the month?'.
Price$0.02per request
MethodPOST
Route/v1/datetime/week-of-month
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
datetimeweek-of-monthcalendarweekdaymonthlyweek-numbernth-weekdayscheduling
API URL
Integration docshttps://x402.hexl.dev/v1/datetime/week-of-monthExample request
{
"date": "2026-06-04"
}Example response
{
"date": "2026-06-04",
"weekday": "Thursday",
"weekStartsOn": 1,
"weekOfMonthSimple": 1,
"weekOfMonthCalendar": 1,
"nthWeekdayInMonth": 1,
"weeksInMonth": 5,
"isLastWeekOfMonth": false,
"interpretation": "2026-06-04 is in calendar week 1 of 5 (week starting Monday); it is the 1st Thursday of the month."
}Input schema
{
"type": "object",
"required": [
"date"
],
"properties": {
"date": {
"type": "string",
"examples": [
"2026-06-04"
]
},
"weekStartsOn": {
"type": "integer",
"examples": [
1
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}