Skip to contents

Calculate the time of sunrise and sunset at a specific location and date. The time zone of the location is used as specified in the location object.

Usage

sunrise(date, location, ...)

sunset(date, location, ...)

Arguments

date

Date in rd_fixed format

location

Location of class "location", usually the output from the location function

...

Additional arguments passed to specific methods

Value

Time of sunrise

Examples

melbourne <- location(-37.8136, 144.9631, 31, 10)
sydney <- location(-33.8688, 151.2093, 3, 10)
sunrise("2025-01-01", c(melbourne, sydney))
#> <time_of_day[2]>
#> [1] 05:00:25.00 04:47:19.90
sunset("2025-01-01", c(melbourne, sydney))
#> <time_of_day[2]>
#> [1] 19:46:39.75 19:09:47.84