fix: Improve readability of dates#122
Merged
DylanDevelops merged 1 commit intoMay 10, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Checklist
mainbranch of tmpo.Description
This pull request primarily enhances the formatting and display of dates, times, and durations throughout the codebase. It introduces new utility functions for flexible date/time formatting based on user preferences, improves duration formatting to support multi-day intervals, and updates the CLI to use these new utilities for consistency. Additionally, the code is refactored for better clarity and maintainability, with expanded documentation for key functions.
Date and Time Formatting Improvements:
internal/settings/global_config.goto support user-configurable and human-friendly display of dates and times, includingFormatDateTime,FormatDateTimeDashed,FormatDateLong, andFormatDateTimeLong. These functions ensure consistent and user-preferred formatting across the application.StatusCmdincmd/milestones/status.goto usesettings.FormatDateTimeinstead of the previousFormatTime, improving the displayed milestone start time format.Duration Formatting Enhancements:
FormatDurationfunction ininternal/ui/ui.goto support durations longer than 24 hours by displaying days, and updated its logic for clearer output.internal/ui/ui_test.goto cover new duration formatting scenarios, including multi-day durations.Code Quality and Documentation:
internal/settings/global_config.go, improving code readability and maintainability. [1] [2] [3] [4] [5] [6] [7] [8]These changes collectively improve the user experience by providing more informative, readable, and consistent time and duration displays throughout the application.
Screenshots