Sunrise

Sunrise[]
gives the time of the next sunrise for the current date and location.

Sunrise[datespec]
gives the times of the next sunrise for the specified dates.

Sunrise[locationspec]
gives the times of the next sunrise for the specified locations.

Sunrise[locationspec,datespec]
gives the time of the next sunrise for the specified date and location.

Sunrise[{{location1,date1},{location2,date2},}]
gives the times of the next sunrise for all specified locations on the specified dates.

Sunrise[locationspec,datespec,func]
uses func to determine what to return for extended locations.

Details and OptionsDetails and Options

  • Sunrise[] makes use of $GeoLocation and $TimeZone to determine your location and time zone.
  • Results are given to minute resolution in the specified TimeZone.
  • Locations can be specified as Entity objects, assuming they represent objects with geographic coordinates or GeoGraphics primitives, or they can be latitude/longitude pairs, assuming degrees as units.
  • Dates can be specified as a DateObject or as a string that resolves to a date.
  • locationspec and datespec can be either individual items or lists of them.
  • If datespec is a list of dates, then the results will contain EventSeries objects.
  • datespec can be specified as for compatibility with DateRange specifications.
  • Sunrise[,func] is used to specify the format of output when extended locations are specified.
  • Possible settings for func include:
  • Automaticreturns intervals for extended locations only
    Intervalreturns intervals for all specified locations
    Meanreturns mean value for extended locations
    Minreturns minimum values for extended locations
    Maxreturns maximum values for extended locations
    StandardDeviationreturns standard deviation for extended locations
  • Sunrise[TimeZone->z] gives the date of the next sunrise with date and time inferred for time zone z by assuming that your computer is set for the time zone specified by $TimeZone.
  • Sunrise[TimeDirection->-1] gives the date of the last sunrise.
  • Sunrise can accept the following options:
  • TimeDirection1whether to return the next or last Sunrise
    TimeZone$TimeZonetime zone to be used for dates
  • Possible settings for TimeDirection include:
  • 1returns the next sunrise from the specified date
    -1returns the last sunrise from the specified date

ExamplesExamplesopen allclose all

Basic Examples  (6)Basic Examples  (6)

Compute the next sunrise for your current location:

In[1]:=
Click for copyable input
Out[1]=

Compute the next sunrise after a specified date:

In[1]:=
Click for copyable input
Out[1]=

Compute the next sunrise for a specified location:

In[1]:=
Click for copyable input
Out[1]=

Compute the next sunrise for a specified latitude/longitude and date:

In[1]:=
Click for copyable input
Out[1]=

Compute the next sunrise for a specified city and date:

In[1]:=
Click for copyable input
Out[1]=

Generate the time of the next sunrise:

In[1]:=
Click for copyable input
Out[1]=
Introduced in 2014
(10.0)