Show HN: Daylight – track sunrise / sunset times in your terminal

  • I was curious how the times were obtained. It uses https://github.com/nathan-osman/go-sunrise , which links to this calculation method: https://en.wikipedia.org/wiki/Sunrise_equation#Complete_calc...

  • Of course, you can get this information in Emacs, too. You'll need to get your lat and long, first:

        (setq calendar-latitude  12.3456
              calendar-longitude -98.7654)
    
    Then, you can `M-x sunrise-sunset` and see the times (and total daylight hours) in the echo area.

  • Great looking app!!

    I immediately checked how you do location lookups:

    > IP lookup is powered by https://ipinfo.io. They provide a good service so please don't spam requests.

    There was a thread about them recently β€” the scale of their operation was very surprising.

  • Windows build works fine (Windows 10 Professional x64 22H2).

  • I live in a place where it often rains, and I really love sunny weather. It makes me feel a bit down when I see that it's already dark by the time I get off work. I was wondering, since the Earth's revolution is taken into account, the time you get should be different every day, right?

  • Does this pull the times from an online service or are they calculated locally? I tried to read the code to work it out but I don't program in Go so I got a little lost

  • Cool! Can we use the sky hue as Terminal background or overal β€œtheme”?

  • Is the noon color scheme supposed to look like Finn from Adventure Time?

  • This is nice, I like it!

    Is there a way to make it use 24h time, rather than AM/PM?