Skip to content
    Endpoint guide

    Calendar projection

    GET /v1/time/calendarOpenAPI YAML

    Calendar fields (year, month, day) for a target instant resolved through any selector.

    What do I need to send?

    Required / choose this first

    Choose one target selector: tz, ip, lat + lon, or offset. The timestamp input is optional and defaults to now.

    Optional

    unix, unix_ms, iso, week, format, and sign are optional.

    Rule: The response adds calendar fields after resolving the target instant.

    NameNeeded?Use it for
    unixChoose one inputInput timestamp as Unix seconds. Defaults to now.
    unix_msChoose one inputInput timestamp as Unix milliseconds.
    isoChoose one inputInput timestamp as ISO 8601.
    tzChoose one targetProject into this IANA zone.
    ipChoose one targetProject into the zone of this IP.
    latPair parameterLatitude, pair with lon.
    lonPair parameterLongitude.
    offsetChoose one targetProject against a fixed UTC offset (URL-encode + as %2B).
    weekOptionalSet true to include the ISO week_number.
    formatOptionalstrftime pattern for an extra `formatted` field.
    signOptionalSet 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.