Wolfram Language

Daily Dose of Sunshine

The amount of daylight varies over the course of the year, with more during the summer and less during the winter. Plot how much there is each day, centered around noon local time.

Create a list of days in a year, including the exact time zone so you can properly account for Daylight Saving Time.

Get the corresponding instances of noon for comparison.

Get the sunrise and sunset times for the set of dates.

Convert the sunrises and sunsets to ranges of values centered around noon.

Plot the daylight bands to see when the sun rises and sets in Champaign. There are clear jumps for the transitions to and from Daylight Saving Time.

Related Examples

de es fr ja ko pt-br zh