Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added dynamic sunrise/sunset calculations #19

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

wizardishungry
Copy link
Contributor

This isn't perfect and there's probably some edge cases but it looks cool. Coupled it with my other patch for now:
image

@oz
Copy link
Owner

oz commented Mar 29, 2021

I merged the other patch with -when, so this won't merge cleanly as is.

It's nice that you made tzcoords and the output looks nice even if a little bit useless if you really need to work with the South Pole... ⛄😄 That's why sunrise/sunset times are more social guides than real astrological times, so far.

The trouble, as often, would be to keep everything updated as now tz updates would also depend on tzcoords updates instead of relying on the host's own database (or even golang's own copy). There's maybe an opportunity to copy the tzcoords lib here ; as the proverb goes a little copying is better than a little dependency . This could help other issues too: for instance, we are looking for a way to list/suggest TZ names to users.

I hope you don't mind the long text. I'm kind of writing out ideas as they appeared.

@wizardishungry
Copy link
Contributor Author

tzcoords is MIT licensed, so it's fair game to reuse any part of it.

In this PR, there's a few corner cases that may also not be covered:

@oz
Copy link
Owner

oz commented Aug 21, 2022

With a bit more hindsight, I'd rather not have tz show the astrological sunrise/sunset times all the time. While using it, I'm often looking for times that are inside "work hours" and fit everyone's schedule. The current color scheme works pretty well in that case, and I'd rather not remove that. 🤔

I definitely like the feature though. If you can make that a flag, I can look into merging it. Otherwise, I'll try to find time on my own some day to reuse the code here. 🔮

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants