Calendar projection
GET /v1/time/calendarOpenAPI YAMLCalendar fields (year, month, day) for a target instant resolved through any selector.
What do I need to send?
Choose one target selector: tz, ip, lat + lon, or offset. The timestamp input is optional and defaults to now.
unix, unix_ms, iso, week, format, and sign are optional.
Rule: The response adds calendar fields after resolving the target instant.
| Name | Needed? | Use it for |
|---|---|---|
unix | Choose one input | Input timestamp as Unix seconds. Defaults to now. |
unix_ms | Choose one input | Input timestamp as Unix milliseconds. |
iso | Choose one input | Input timestamp as ISO 8601. |
tz | Choose one target | Project into this IANA zone. |
ip | Choose one target | Project into the zone of this IP. |
lat | Pair parameter | Latitude, pair with lon. |
lon | Pair parameter | Longitude. |
offset | Choose one target | Project against a fixed UTC offset (URL-encode + as %2B). |
week | Optional | Set true to include the ISO week_number. |
format | Optional | strftime pattern for an extra `formatted` field. |
sign | Optional | Set true for a signed response. |
Code samples
Copy a request in your preferred language and replace YOUR_TIMELOGIC_API_KEY with your direct API key.
curl "https://api.timelogicapi.com/v1/time/calendar?tz=Europe/Paris&week=true" \
-H "Authorization: Bearer $TIMELOGIC_API_KEY"Example response
{
"unix": 1778093026,
"unix_ms": 1778093026668,
"utc": "2026-05-06T18:43:46Z",
"iso_local": "2026-05-06T20:43:46+02:00",
"rfc2822": "Wed, 06 May 2026 20:43:46 +0200",
"human": "May 6, 2026, 8:43 PM Europe/Paris",
"day_number": 4,
"day_short": "Wed",
"day_full": "Wednesday",
"timezone": "Europe/Paris",
"year": 2026,
"month": 5,
"month_name": "May",
"day": 6,
"week_number": 19
}
Additional endpoint notes
https://api.timelogicapi.com/v1/time/calendar?tz=Europe/Paris&week=true
https://api.timelogicapi.com/v1/time/calendar?unix=1711300000&tz=Europe/Paris
Common errors
400 AMBIGUOUS_TARGET— multiple input or target selector families.400 INVALID_PARAMETER— bad timezone, offset, or strftime directive.
When to use this endpoint
Use Calendar projection when you need calendar fields for a target instant after resolving it through a timezone, IP address, coordinates, or fixed offset. It is useful for reports, date pickers, locale-aware grouping, and analytics labels.
Request model
Choose a timestamp input or omit it to project the current request time. Then choose a single target selector family (tz, ip, lat + lon, or offset) to define the calendar context.
Response notes
Calendar fields are derived after timezone resolution, so the same UTC instant can produce different year, month, day, weekday, and day-of-year values in different zones.