Releases: tiny-blocks/time
Releases · tiny-blocks/time
v2.1.0
- Introduces
LocalDate(+InvalidLocalDate) and documentation/tests for date-only operations and projecting anInstantinto a civil date. - Adds
Precisionand extendsInstant::toIso8601()to optionally emit milliseconds/microseconds; updates offset datetime decoding to accept fractional seconds. - Refactors multiple unit tests toward more explicit Given/When/Then steps and expands Instant coverage for precision formatting.
v2.0.0
- Promote time-domain exceptions from
TinyBlocks\Time\Internal\ExceptionstoTinyBlocks\Time\Exceptionsand update imports/usages acrosssrc/andtests/. - Adopt canonical tooling and workflow conventions (Composer scripts, PHPUnit/PHPStan/PHPCS config, report paths under
reports/, CI concurrency and PHP version resolution).
v1.5.1
- Simplify
Instant::now()implementation and remove the no-longer-needed microsecond format constant. - Change timezone identifier validation to call
DateTimeZone::listIdentifiers()directly (and remove the cached helper). - Refresh project tooling/config/docs (Composer config/scripts, Infection mutators, Makefile targets, repo dotfiles, and new
.claude/rule docs).
v1.5.0
- Add
DayOfWeek::distanceTo()for forward (wrap-around) day distance calculations. - Update
TimeOfDay::fromString()to acceptHH:MM:SSand discard seconds. - Expand PHPUnit coverage and README examples for both features.
v1.4.0
- Add
DayOfWeek(ISO-8601 weekday enum) andTimeOfDay(HH:MM value object) with corresponding tests and README documentation. - Refactor
Durationto use an internalSecondsvalue object, introduceInvalidSeconds, adddivide(), and switch tofrom*()factories +toSeconds()accessor. - Rename
Period::of()toPeriod::from()and update usages across tests and README.
v1.3.0
- Introduces
Duration(unsigned seconds-based quantity) with arithmetic, comparisons, and unit conversions. - Introduces
Period(half-open interval[from, to)) with validation pluscontains()andoverlapsWith()logic. - Extends
Instantwithplus(),minus(),durationUntil(), and comparison helpers. - Updates tests and README accordingly.
v1.2.0
- Added
DatabaseDateTimeDecoderto parse database timestamp strings with space separator and optional microsecond precision. - Added comprehensive test coverage for database format parsing including edge cases.
- Updated README with documentation and examples for database timestamp parsing.
v1.1.0
- Implemented
findByIdentifierOrUtcmethod inTimezonesclass to return a matching timezone or UTC if not found. - Updated README.md with usage example for the new method.
- Added tests for
findByIdentifierOrUtcto ensure correct functionality.
v1.0.0
- Introduces
Instant(UTC-normalized) with string decoding and Unix-seconds constructors, plus formatting/accessors. - Adds
TimezoneandTimezonescollection utilities (construction, lookup, conversion). - Adds CI configuration with GitHub Actions for automated testing and code analysis.
- Enhanced README with project overview and usage instructions.