One Logo Pool Ball
WeatherKit · IOS API REFERENCE

MoonEvents

struct · iOS 16.0+ · SDK 27.1

struct MoonEvents

A structure that represents lunar events.

Members (6)

get · iOS 16.0+

phase

TypeScript
get phase(): MoonPhase
Swift declaration
var phase: MoonPhase

The moon phase.

set · iOS 16.0+

phase

TypeScript
set phase(value: MoonPhase)
Swift declaration
var phase: MoonPhase

The moon phase.

get · iOS 16.0+

moonset

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

The time of moonset. Moonset occurs when the moon sets below Earth's horizon.

set · iOS 16.0+

moonset

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

The time of moonset. Moonset occurs when the moon sets below Earth's horizon.

get · iOS 16.0+

moonrise

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

The time of moonrise. Moonrise occurs when the moon first appears above Earth’s horizon.

set · iOS 16.0+

moonrise

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

The time of moonrise. Moonrise occurs when the moon first appears above Earth’s horizon.

Skipped declarations

No declarations were skipped in this snapshot.

All WeatherKit types →