Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Compute the starting times for variations of twilight
ResourceFunction["TwilightTimes"][] computes starting times for available variations of twilight. | |
ResourceFunction["TwilightTimes"][spec] computes the starting time for the specified variation spec. | |
ResourceFunction["TwilightTimes"][spec, loc] computes the starting time as observed from loc. | |
ResourceFunction["TwilightTimes"][spec, date] computes the starting time on date. | |
ResourceFunction["TwilightTimes"][spec,loc, date] computes the starting time on date as observed from loc. |
Compute the times for all twilight variations for the current date:
| In[1]:= |
| Out[1]= | ![]() |
Compute the times for a specific twilight variation for the current date:
| In[2]:= |
| Out[2]= |
Compute the times for a specific twilight variation for a specified date:
| In[3]:= |
| Out[3]= |
Compute the times for a specific twilight variation for a specified location and date:
| In[4]:= |
| Out[4]= | ![]() |
Compute times for morning twilight:
| In[5]:= |
| Out[5]= |
| In[6]:= |
| Out[6]= |
| In[7]:= |
| Out[7]= |
Compute times for evening twilight:
| In[8]:= |
| Out[8]= |
| In[9]:= |
| Out[9]= |
| In[10]:= |
| Out[10]= |
Twilight differs depending on the time of year:
| In[11]:= |
| Out[11]= |
| In[12]:= |
| Out[12]= |
Dates can be specified in multiple forms:
| In[13]:= |
| Out[13]= |
| In[14]:= |
| Out[14]= |
| In[15]:= |
| Out[15]= |
Twilight times differ based on the specified location:
| In[16]:= |
| Out[16]= |
| In[17]:= |
| Out[17]= |
| In[18]:= |
| Out[18]= |
Locations can be entities:
| In[19]:= |
| Out[19]= |
Override the default time zone:
| In[20]:= |
| Out[20]= |
If you go too far north/south, you may end up in a midnight sun or polar night scenario, depending on the time of year, where the Sun never sets within a 24-hour period. In such cases, the results will be missing:
| In[21]:= |
| Out[21]= |
| In[22]:= |
| Out[22]= |
This work is licensed under a Creative Commons Attribution 4.0 International License