Skip to content

fix: Improve readability of dates#122

Merged
DylanDevelops merged 1 commit into
mainfrom
ravel/fix-milestone-milestone-duration-huge-w-zero
May 10, 2026
Merged

fix: Improve readability of dates#122
DylanDevelops merged 1 commit into
mainfrom
ravel/fix-milestone-milestone-duration-huge-w-zero

Conversation

@DylanDevelops
Copy link
Copy Markdown
Owner

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.

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:

  • Added several new formatting functions in internal/settings/global_config.go to support user-configurable and human-friendly display of dates and times, including FormatDateTime, FormatDateTimeDashed, FormatDateLong, and FormatDateTimeLong. These functions ensure consistent and user-preferred formatting across the application.
  • Updated the StatusCmd in cmd/milestones/status.go to use settings.FormatDateTime instead of the previous FormatTime, improving the displayed milestone start time format.

Duration Formatting Enhancements:

  • Improved the FormatDuration function in internal/ui/ui.go to support durations longer than 24 hours by displaying days, and updated its logic for clearer output.
  • Expanded unit tests in internal/ui/ui_test.go to cover new duration formatting scenarios, including multi-day durations.

Code Quality and Documentation:

  • Added and clarified documentation comments for public functions in 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

Screenshot 2026-05-10 at 10 26 35 AM

@DylanDevelops DylanDevelops merged commit f6faee6 into main May 10, 2026
5 checks passed
@DylanDevelops DylanDevelops deleted the ravel/fix-milestone-milestone-duration-huge-w-zero branch May 10, 2026 17:47
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.

1 participant