-
Notifications
You must be signed in to change notification settings - Fork 707
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
Update Thanksgiving Day app to dynamically calculate days till thanksgiving #2872
Conversation
Current logic only works for 2024 and 2025. New logic works indefinitely.
Next StepsHello! Thank you so much for your change 🤜 🤛 . There are a few things you need to do:
Manual Review RequiredHang tight! A Tidbyt engineer will be by shortly to review your change. Here is what they will be looking for:
|
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
Update > 0 day logic to >= 0
print(thanksgiving) | ||
days_til_thanksgiving = math.ceil(time.parse_duration(thanksgiving - now).seconds / 86400) | ||
print(days_til_thanksgiving) | ||
timezone = config.get("timezone") or "America/New_York" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be timezone = config.get("$tz", "America/New_York")
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m gonna be honest, I have no idea. Looks to be that way ($tx) in some of the other countdown apps (ie Christmas) but it’s this way (timezone) in the Halloween countdown. Not sure which way is the correct way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Halloween countdown app was fixed in #2854.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah i see, I'll go ahead and update it then
Current logic is hard coded for 2024 and 2025. This update changes the logic to calculate the days indefinitely.