About this endpoint
What it does
Converts a date/time input into multiple output formats, including UTC representations, relative time, localized time for a provided timezone, and epoch values. The request accepts a date/time value and an IANA timezone tz for localized output.
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| tz | String | No | IANA timezone for localized output. |
| value | String | No | Date/time input as an ISO 8601 string, Unix epoch, or now. |
Response
Returns a JSON object with these fields: input string, iso_utc string, weekday string, iso_week integer, relative string, human_utc string, localized object, day_of_year integer, epoch_millis integer, and epoch_seconds integer. The localized object contains tz string, iso string, human string, and utc_offset string.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| input | String | No | Original input value as returned by the service. |
| iso_utc | String | No | UTC timestamp in ISO format. |
| weekday | String | No | Weekday name for the converted date/time. |
| iso_week | Integer | No | ISO week number. |
| relative | String | No | Relative time description. |
| human_utc | String | No | Human-readable UTC format. |
| localized | Object | No | Localized date/time details for the requested timezone. |
| day_of_year | Integer | No | Day number within the year. |
| epoch_millis | Integer | No | Unix epoch in milliseconds. |
| epoch_seconds | Integer | No | Unix epoch in seconds. |