Skip to content

Conversation

@marlonlom
Copy link
Owner

Pull request detail

This PR corrects the validation ranges for the ONE_HOUR_PAST and ONE_HOUR_FUTURE periods so they accurately represent a one-hour time window.

It also improves CalendarSampleDataUtil by adding a dedicated helper method to generate timestamps with a one-hour difference.

Changes

  • ⏱️ Adjusted validation ranges
    • ONE_HOUR_PAST: 60..12060..119
    • ONE_HOUR_FUTURE: -60..-120-60..-119
  • 🧪 Sample data improvements
    • Added addDateTimeWithOneHour(...)
    • Explicit import of java.util.Calendar

Motivation

  • Prevent misclassification of time distances greater than one hour
  • Improve semantic correctness of time period handling
  • Enhance clarity and usefulness of sample data utilities

Impact

  • No breaking changes
  • Improved accuracy for time period validation
  • Better support for tests and sample data generation

@marlonlom marlonlom self-assigned this Dec 26, 2025
@marlonlom marlonlom added bug Indicates an unexpected problem or unintended behavior enhancement Indicates new feature requests labels Dec 26, 2025
@marlonlom marlonlom linked an issue Dec 26, 2025 that may be closed by this pull request
@marlonlom marlonlom added kotlin Indicates a need for improvements or additions to kotlin code documentation Indicates a need for improvements or additions to documentation jetpack-compose Pull requests that update android code made with jetpack compose labels Dec 26, 2025
@marlonlom marlonlom merged commit 73cbfb6 into main Dec 26, 2025
2 checks passed
@marlonlom marlonlom deleted the fix/one_hour_period_boundaries branch December 26, 2025 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Indicates an unexpected problem or unintended behavior documentation Indicates a need for improvements or additions to documentation enhancement Indicates new feature requests jetpack-compose Pull requests that update android code made with jetpack compose kotlin Indicates a need for improvements or additions to kotlin code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect ONE_HOUR range validation and missing sample utility

2 participants