Skip to content

Conversation

@DylanDevelops
Copy link
Owner

Replaces use of Truncate with time.Date to accurately set the start of the day when calculating stats for today and this week. This ensures correct period boundaries based on the current location.

Pull Request Checklist

  • I have read and followed the contribution guidelines.
  • My pull request targets the main branch of tmpo.
  • I have tested these changes locally on my machine.

Closes #32

Description

This pull request makes small improvements to the way the start date is calculated for the "today" and "this week" statistics in the StatsCmd function. The changes improve clarity and consistency in how the start of the day is determined.

  • Changed the calculation of the start of "today" to use time.Date for clearer intent and consistency.
  • Updated the calculation of the start of "this week" to also use time.Date, aligning it with the approach used for "today".

Replaces use of Truncate with time.Date to accurately set the start of the day when calculating stats for today and this week. This ensures correct period boundaries based on the current location.
@DylanDevelops DylanDevelops merged commit a9c8924 into main Dec 24, 2025
6 checks passed
@DylanDevelops DylanDevelops deleted the ravel/fix-missing-stats-entries branch December 24, 2025 02:43
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.

tmpo stats -t and tmpo stats -w not showing entries that occurred today

2 participants