---
title: "Planetary Hours"
method: POST
path: "/planetary-hours"
tags: ["Calendar & Cycles"]
---

# Planetary Hours

`POST /planetary-hours`

Chaldean planetary hours for a date and place: 12 from sunrise to sunset and 12 from sunset to sunrise, so an hour is rarely 60 minutes. `startHour` and `endHour` are decimal local hours. Send `atLocalHour` (decimal local time, e.g. 15.2 for 15:12) to have the hour containing it marked `isCurrent`; without it no hour carries the field, because the answer is cacheable and a flag from the server clock would be stale by the time it renders. `sunTimes.polarState` is `normal`, `polar-day` or `polar-night`, and in the two polar cases there is nothing to divide, so `hours` comes back empty with a warning saying why.

## Request body

- PlanetaryHours
  - `date` string, required
  - `latitude` number, nullable, required
  - `longitude` number, nullable, required
  - `timezoneOffset` number, nullable — Hours from UTC at the given moment, not minutes. Fractional zones are hours too: 5.5 for India, 5.75 for Nepal, -3.5 for Newfoundland. Defaults to 0, meaning UTC.
  - `atLocalHour` number — Local time of day in decimal hours, e.g. 15.2 for 15:12. When sent, the hour containing it carries isCurrent: true and every other hour carries false. When omitted, no hour carries the field at all: it is not false, it is unasked.

## Response `200`

Successful calculation

- object
  - `ok` boolean
  - `data` object
    - `date` string, nullable
    - `latitude` number, nullable
    - `longitude` number, nullable
    - `timezone` number, nullable
    - `sunTimes` object, nullable
      - `riseJD` number, nullable
      - `setJD` number, nullable
      - `riseHour` number, nullable
      - `setHour` number, nullable
      - `polarState` string, nullable
    - `dayRulerPlanetId` number, nullable
    - `dayRulerPlanetName` string, nullable
    - `dayOfWeek` number, nullable
    - `hours` object[], nullable
      - `number` number, nullable
      - `planetId` number, nullable
      - `planetName` string, nullable
      - `startHour` number, nullable
      - `endHour` number, nullable
      - `isDaytime` boolean, nullable
      - `isCurrent` boolean, nullable

## Other responses

- `400` — Validation error
- `401` — Missing or invalid API key

---

[API](https://skmtc.net/astroway/apis/astroway-calculation-api.md) · [All operations](https://skmtc.net/astroway/apis/astroway-calculation-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/astroway/astroway-calculation-api/revisions/529d7d36d7d6/schema)
