Skip to content

refactor: Exported CSV and JSON files now list time entries in chronological order#126

Merged
DylanDevelops merged 1 commit into
mainfrom
ravel/tmpo-export-in-chronological-order
Jun 2, 2026
Merged

refactor: Exported CSV and JSON files now list time entries in chronological order#126
DylanDevelops merged 1 commit into
mainfrom
ravel/tmpo-export-in-chronological-order

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 updates the export functionality to ensure that exported time entries are written in chronological order (oldest first) for both CSV and JSON exports. The changes also update the corresponding tests to verify this new ordering.

Export order improvements:

  • Updated both ToCSV in internal/export/csv.go and ToJson in internal/export/json.go to iterate over entries in chronological order using slices.Backward, ensuring exported data is ordered from oldest to newest. [1] [2] [3] [4]

Test updates:

  • Modified tests in internal/export/export_test.go to assert that exported entries are in chronological order for both CSV and JSON exports, updating expected values accordingly. [1] [2]

@DylanDevelops DylanDevelops merged commit 7d9983c into main Jun 2, 2026
5 checks passed
@DylanDevelops DylanDevelops deleted the ravel/tmpo-export-in-chronological-order branch June 2, 2026 22:36
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