Skip to content

Releases: gpgkd906/date_component

v0.4.8

03 Mar 09:54

Choose a tag to compare

v0.4.7

29 Sep 11:59

Choose a tag to compare

use the recommanded github action for Trusted Publishing.

Full Changelog: v0.4.6...v0.4.7

v0.4.6

29 Sep 11:52

Choose a tag to compare

add Trusted Publishing
Full Changelog: v0.4.5...v0.4.6

v0.4.5

12 Sep 07:15

Choose a tag to compare

fix: correct day calculation for small cross-boundary time differences

Fix bug where small time differences crossing date boundaries incorrectly
calculated day components. A 2-second difference spanning midnight now
correctly returns day=0 instead of day=1.

  • Add consistency check for time differences < 1 day
  • Use total duration when calculated components are inconsistent
  • Add edge case tests for cross-boundary scenarios
  • Maintain backward compatibility (all 923 tests pass)

v0.4.4

07 Aug 14:11

Choose a tag to compare

What's Changed

  • Upgrade dependencies
  • refactor tests, splite tests into sperated files
  • enhanced timezone calcuate logic .

New Contributors

Full Changelog: 0.4.3...v0.4.4

0.4.3

12 Apr 11:17

Choose a tag to compare

Optimizing DateComponent Library Performance
We've significantly optimized the calculate function in the DateComponent library, resulting in remarkable performance gains:
・Simple date calculations: 66.5% faster
・Cross-month calculations: 50% faster
・Cross-year calculations: 73% faster
・Daylight Saving Time (DST) calculations: 76% faster
Technical Changes
・Simplified complex conditional logic and nested structures
・Implemented a more direct and efficient date handling algorithm
・Reduced multiple calls to get_nearest_day_before function
・Optimized DST handling by directly using duration-based calculations for hours, minutes, and seconds
Code Quality
・Improved code readability and maintainability
・Standardized time calculation borrowing logic
・Enhanced comments to better explain the implementation
・Maintained full backward compatibility with existing interfaces

Full Changelog: 0.4.2...0.4.3

v0.4.2

05 Jan 10:36

Choose a tag to compare

What's Changed

  • update the dependencies, add more test case.
  • update to v0.4.2