The default location is ZuoLing.

suncalc(
  time,
  lon = 114.6053,
  lat = 30.49694,
  ...,
  year = year(Sys.time()),
  verbose = TRUE
)

sunrise(date = Sys.Date(), lon = 80, lat = 30, timeZone = 8)

Examples

suncalc(Sys.Date())
#> 赤纬角    : 9.13      
#> 太阳高度角: -50.03    
#> 太阳方位角: 8.31      
#> ---
#> 北京时间       : 2026-04-14
#> 当地时间       : 2026-04-14 00:21:34.8
#> ---
#> 日出时间(local): 2026-04-14 05:38:16.221189
#> 日落时间(local): 2026-04-14 18:21:43.778811
#> ---
#> 日出时间(UTC8) : 2026-04-14 05:16:41.421189
#> 日落时间(UTC8) : 2026-04-14 18:00:08.978812
#>    angle_elev angle_azimuth angle_sigma             delta_minute
#>         <num>         <num>       <num>               <Duration>
#> 1:     -50.03          8.31    9.131608 1294.8s (~21.58 minutes)
#>             time_local          time_begin            time_end
#>                 <POSc>              <POSc>              <POSc>
#> 1: 2026-04-14 00:21:34 2026-04-14 05:38:16 2026-04-14 18:21:43

sunrise(Sys.Date())
#>          date           time_noon            time_beg            time_end
#>        <Date>              <POSc>              <POSc>              <POSc>
#> 1: 2026-04-14 2026-04-14 14:40:00 2026-04-14 08:18:42 2026-04-14 21:01:17