One Logo Pool Ball
WeatherKit · IOS API REFERENCE

SunEvents

struct · iOS 16.0+ · SDK 27.1

struct SunEvents

An enumeration that represents dates of solar events, including sunrise, sunset, dawn, and dusk.

Members (20)

get · iOS 16.0+

nauticalDawn

TypeScript
get nauticalDawn(): (globalThis.Date) | null
Swift declaration
var nauticalDawn: Date?

The time of nautical sunrise when the sun’s center is 12° below the horizon. There is enough light for sailors to distinguish the horizon at sea, but the sky is too dark for outdoor activities. This property is optional because it's possible for the sun to not rise on a given day, at extreme latitudes.

set · iOS 16.0+

nauticalDawn

TypeScript
set nauticalDawn(value: (globalThis.Date) | null)
Swift declaration
var nauticalDawn: Date?

The time of nautical sunrise when the sun’s center is 12° below the horizon. There is enough light for sailors to distinguish the horizon at sea, but the sky is too dark for outdoor activities. This property is optional because it's possible for the sun to not rise on a given day, at extreme latitudes.

get · iOS 16.0+

nauticalDusk

TypeScript
get nauticalDusk(): (globalThis.Date) | null
Swift declaration
var nauticalDusk: Date?

The time of nautical sunset, when the sun’s center is 12° below the horizon. This property is optional because it's possible for the sun to not set on a given day, at extreme latitudes. At nautical dusk, most stars become visible, and in clear weather conditions the horizon is visible.

set · iOS 16.0+

nauticalDusk

TypeScript
set nauticalDusk(value: (globalThis.Date) | null)
Swift declaration
var nauticalDusk: Date?

The time of nautical sunset, when the sun’s center is 12° below the horizon. This property is optional because it's possible for the sun to not set on a given day, at extreme latitudes. At nautical dusk, most stars become visible, and in clear weather conditions the horizon is visible.

get · iOS 16.0+

solarMidnight

TypeScript
get solarMidnight(): (globalThis.Date) | null
Swift declaration
var solarMidnight: Date?

Represents solar midnight, the time when the sun reaches its lowest point in the sky. It may or may not be above the horizon at this time due to variations of solar events at extreme latitudes. If the lowest point is not below the horizon, this property is ``nil``.

set · iOS 16.0+

solarMidnight

TypeScript
set solarMidnight(value: (globalThis.Date) | null)
Swift declaration
var solarMidnight: Date?

Represents solar midnight, the time when the sun reaches its lowest point in the sky. It may or may not be above the horizon at this time due to variations of solar events at extreme latitudes. If the lowest point is not below the horizon, this property is ``nil``.

get · iOS 16.0+

astronomicalDawn

TypeScript
get astronomicalDawn(): (globalThis.Date) | null
Swift declaration
var astronomicalDawn: Date?

The time of astronomical sunrise when the sun’s center is 18° below the horizon. A small portion of the sun's rays begin to illuminate the sky and stars begin to disappear. This property is optional because it's possible for the sun to not rise on a given day, at extreme latitudes.

set · iOS 16.0+

astronomicalDawn

TypeScript
set astronomicalDawn(value: (globalThis.Date) | null)
Swift declaration
var astronomicalDawn: Date?

The time of astronomical sunrise when the sun’s center is 18° below the horizon. A small portion of the sun's rays begin to illuminate the sky and stars begin to disappear. This property is optional because it's possible for the sun to not rise on a given day, at extreme latitudes.

get · iOS 16.0+

astronomicalDusk

TypeScript
get astronomicalDusk(): (globalThis.Date) | null
Swift declaration
var astronomicalDusk: Date?

The time of astronomical sunset, when the sun’s center is 18° below the horizon. The sun no longer illuminates the sky, and does not interfere with astronomical observations. This property is optional because it's possible for the sun to not set on a given day, at extreme latitudes.

set · iOS 16.0+

astronomicalDusk

TypeScript
set astronomicalDusk(value: (globalThis.Date) | null)
Swift declaration
var astronomicalDusk: Date?

The time of astronomical sunset, when the sun’s center is 18° below the horizon. The sun no longer illuminates the sky, and does not interfere with astronomical observations. This property is optional because it's possible for the sun to not set on a given day, at extreme latitudes.

get · iOS 16.0+

sunset

TypeScript
get sunset(): (globalThis.Date) | null
Swift declaration
var sunset: Date?

The sunset time immediately after the solar transit closest to calendar noon. This property is optional because it's possible for the sun to not set on a given day, at extreme latitudes. That calendar noon is used as a reference point due to variations in frequency of solar events at extreme latitudes.

set · iOS 16.0+

sunset

TypeScript
set sunset(value: (globalThis.Date) | null)
Swift declaration
var sunset: Date?

The sunset time immediately after the solar transit closest to calendar noon. This property is optional because it's possible for the sun to not set on a given day, at extreme latitudes. That calendar noon is used as a reference point due to variations in frequency of solar events at extreme latitudes.

get · iOS 16.0+

sunrise

TypeScript
get sunrise(): (globalThis.Date) | null
Swift declaration
var sunrise: Date?

The sunrise time immediately before the solar transit closest to calendar noon. This property is optional because it's possible for the sun to not rise on a given day, at extreme latitudes. That calendar noon is used as a reference point due to variations in frequency of solar events at extreme latitudes.

set · iOS 16.0+

sunrise

TypeScript
set sunrise(value: (globalThis.Date) | null)
Swift declaration
var sunrise: Date?

The sunrise time immediately before the solar transit closest to calendar noon. This property is optional because it's possible for the sun to not rise on a given day, at extreme latitudes. That calendar noon is used as a reference point due to variations in frequency of solar events at extreme latitudes.

get · iOS 16.0+

civilDawn

TypeScript
get civilDawn(): (globalThis.Date) | null
Swift declaration
var civilDawn: Date?

The time of civil sunrise when the sun’s center is 6° below the horizon. Civil dawn begins when there's enough light for most objects to be seen, so it's often used to determine when outdoor activities may begin. This property is optional because it's possible for the sun to not rise on a given day, at extreme latitudes.

set · iOS 16.0+

civilDawn

TypeScript
set civilDawn(value: (globalThis.Date) | null)
Swift declaration
var civilDawn: Date?

The time of civil sunrise when the sun’s center is 6° below the horizon. Civil dawn begins when there's enough light for most objects to be seen, so it's often used to determine when outdoor activities may begin. This property is optional because it's possible for the sun to not rise on a given day, at extreme latitudes.

get · iOS 16.0+

civilDusk

TypeScript
get civilDusk(): (globalThis.Date) | null
Swift declaration
var civilDusk: Date?

The time of civil sunset, when the sun’s center is 6° below the horizon. The sky is often colored orange or red, and objects are typically distinguishable. Beyond civil dusk, artificial light may be needed for outdoor activities, depending on weather conditions. This property is optional because it's possible for the sun to not set on a given day, at extreme latitudes.

set · iOS 16.0+

civilDusk

TypeScript
set civilDusk(value: (globalThis.Date) | null)
Swift declaration
var civilDusk: Date?

The time of civil sunset, when the sun’s center is 6° below the horizon. The sky is often colored orange or red, and objects are typically distinguishable. Beyond civil dusk, artificial light may be needed for outdoor activities, depending on weather conditions. This property is optional because it's possible for the sun to not set on a given day, at extreme latitudes.

get · iOS 16.0+

solarNoon

TypeScript
get solarNoon(): (globalThis.Date) | null
Swift declaration
var solarNoon: Date?

Represents solar noon, the time when the sun reaches its highest point in the sky. It may or may not be above the horizon at this time due to variations of solar events at extreme latitudes. If the highest point isn't above the horizon, this property is ``nil``.

set · iOS 16.0+

solarNoon

TypeScript
set solarNoon(value: (globalThis.Date) | null)
Swift declaration
var solarNoon: Date?

Represents solar noon, the time when the sun reaches its highest point in the sky. It may or may not be above the horizon at this time due to variations of solar events at extreme latitudes. If the highest point isn't above the horizon, this property is ``nil``.

Skipped declarations

No declarations were skipped in this snapshot.

All WeatherKit types →