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

Update Thanksgiving Day app to dynamically calculate days till thanksgiving #2872

Merged
merged 14 commits into from
Nov 24, 2024

Conversation

savdagod
Copy link
Contributor

@savdagod savdagod commented Nov 9, 2024

Current logic is hard coded for 2024 and 2025. This update changes the logic to calculate the days indefinitely.

@tidbyt
Copy link

tidbyt bot commented Nov 9, 2024

⚠️ The automated review process is experimental and likely has bugs. Please bear with us as we iron out the kinks and enable you to ship changes at high velocity 🚀

Next Steps

Hello! Thank you so much for your change 🤜 🤛 . There are a few things you need to do:

  • Sign the CLA if you haven't already
  • Ensure your build is green! Any problem will display a proposed solution to try out
  • Get a review, either by Tidbyt Bot or by a Tidbyt engineer

Manual Review Required

Hang tight! A Tidbyt engineer will be by shortly to review your change. Here is what they will be looking for:

Test Details
App Dir All files are in a single app directory
Modules Only safe modules, without side-effects, are loaded
🟡 Original Author The original author (jalexcooney) does not match the PR author (savdagod)

@tidbyt-bot
Copy link

tidbyt-bot commented Nov 9, 2024

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

tidbyt[bot]
tidbyt bot previously approved these changes Nov 9, 2024
@savdagod
Copy link
Contributor Author

savdagod commented Nov 9, 2024

I have read the CLA Document and I hereby sign the CLA

@savdagod savdagod changed the title Dynamically calculate days till thanksgiving Update Thanksgiving Day app to dynamically calculate days till thanksgiving Nov 10, 2024
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"
Copy link
Contributor

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")?

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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

@rohansingh rohansingh merged commit 616f0ed into tidbyt:main Nov 24, 2024
2 checks passed
@tidbyt tidbyt locked as resolved and limited conversation to collaborators Nov 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants