Date & Time
Next/previous weekday API
Finds the next or previous occurrence of a given weekday relative to a reference date, with an optional includeStart flag, returning the resolved date and signed day offset. Answers 'When is the next Monday after this date?', 'Find the previous Friday.'.
Price$0.02per request
MethodPOST
Route/v1/datetime/next-weekday
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
datetimenext-weekdayweekdayrecurrencecalendarschedulepreviousupcoming
API URL
Integration docshttps://x402.hexl.dev/v1/datetime/next-weekdayExample request
{
"from": "2026-06-04",
"weekday": "Monday"
}Example response
{
"from": "2026-06-04",
"weekday": "Monday",
"direction": "next",
"includeStart": false,
"result": "2026-06-08",
"daysAway": 4,
"interpretation": "The next Monday relative to 2026-06-04 is 2026-06-08 (+4 day(s))."
}Input schema
{
"type": "object",
"required": [
"from",
"weekday"
],
"properties": {
"from": {
"type": "string",
"examples": [
"2026-06-04"
]
},
"weekday": {
"type": [
"string",
"integer"
],
"examples": [
"Monday"
]
},
"direction": {
"type": "string",
"enum": [
"next",
"previous"
],
"examples": [
"next"
]
},
"includeStart": {
"type": "boolean"
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}