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

Fix yesterday/lastWeek calculations #115

Merged
merged 2 commits into from
Jan 19, 2023
Merged

Fix yesterday/lastWeek calculations #115

merged 2 commits into from
Jan 19, 2023

Conversation

bearfriend
Copy link
Contributor

I noticed that yesterday at exactly midnight was rendering as "1 day ago".

  • Swapped > for >= in both yesterday and lastWeek calculations
  • Flip the order of the non-numeric checks and used an else if instead of two ifs
  • Test the absolute thresholds for non-numeric cases with absolute dates

@dlockhart dlockhart merged commit f76e7a2 into main Jan 19, 2023
@dlockhart dlockhart deleted the yesterday branch January 19, 2023 14:06
@ghost
Copy link

ghost commented Jan 19, 2023

🎉 This PR is included in version 3.13.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@ghost ghost added the released label Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants