Releases: gpgkd906/date_component
v0.4.8
v0.4.7
use the recommanded github action for Trusted Publishing.
Full Changelog: v0.4.6...v0.4.7
v0.4.6
add Trusted Publishing
Full Changelog: v0.4.5...v0.4.6
v0.4.5
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
What's Changed
- Upgrade dependencies
- refactor tests, splite tests into sperated files
- enhanced timezone calcuate logic .
New Contributors
- @google-labs-jules[bot] made their first contribution in #11
Full Changelog: 0.4.3...v0.4.4
0.4.3
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