Learn R Programming

astronomyengine (version 0.1.0)

astro_search_moon_phase: Search for a Specific Moon Phase

Description

Searches for the time when the Moon reaches a specified phase angle.

Usage

astro_search_moon_phase(target_lon, start_time, limit_days)

Value

A POSIXct datetime when the Moon reaches the target phase.

Arguments

target_lon

A numeric value in the range [0, 360) representing the target phase angle. Common values: 0 = new moon, 90 = first quarter, 180 = full moon, 270 = third quarter.

start_time

A POSIXct datetime to begin the search.

limit_days

A numeric value specifying the search window in days. Positive values search forward, negative values search backward.

Examples

Run this code
start <- as.POSIXct("2025-02-19", tz = "UTC")
astro_search_moon_phase(0, start, 30)  # Find next new moon

Run the code above in your browser using DataLab