A Garmin Connect IQ data field to show the time until (or the time of) the next sunrise or sunset. The data field can automatically turn the backlight on between sunset and sunrise.
The calculation depends on time and location.
I have taken it from the excellent code by Harald Hoyer (https://github.com/haraldh/SunCalc/). He wrote it for his SunCalc widget available at https://apps.garmin.com/en-US/apps/87b86650-a443-43ea-9dcb-29e4051a5722 that shows not only sunrise and sunset but much more.
Icon design is by Freepik (https://www.flaticon.com/authors/freepik) from https://www.flaticon.com and licensed by CC BY 3.0 (https://creativecommons.org/licenses/by/3.0).