Core

Sun Times

Calculate sunrise, sunset, twilight times, and day length for a given date and geographic location.

post/sun-times

Request body

datestring required
latitudenumber nullable required
longitudenumber nullable required
timezoneOffsetnumber 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.

Response

Successful calculation

okboolean

Example response

{
  "ok": true
}

Changes

Changed in 1 of the 13 revisions of this API.21

  • e637d1a9911b21See the full diff
    • the timezoneOffset request property's max was set to 14.00

      request-property-max-set

    • the timezoneOffset request property's min was set to -14.00

      request-property-min-set

    • the timezoneOffset request property default value 0 was added

      request-property-default-value-added