Releases: jeromegamez/duration-php
Releases · jeromegamez/duration-php
Release list
5.0.0
4.3
4.2
4.1
- PHP 7.3.4 is now the minimum required version.
Durationnow extendsDateIntervaland can be used interchangeably.- Objects having a
__toString()method are now supported values. Duration::toDateInterval()is now deprecated.
4.0
- PHP 7.3 is now the minimum required version.
0,null,false,trueare now supported values as in that they result inDuration::none()(PT0S).- An
InvalidDurationerror will be thrown if a value is given without a unit or if the given value cannot be parsed. toIntervalSpec()did more than it needed to do. Instead of formatting the current value the spec itself is now returned.
3.0.1
New DateTimeImmutable instances ignore timezones when created #3
3.0
The Duration class is final again (and will stay that way) #2
2.0
The Duration class is now extensible instead of macroable.
1.1
- Thrown exceptions implement
Gamez\Duration\DurationException - An operation resulting in an invalid duration will throw a
Gamez\Duration\Exception\InvalidDuration
1.0.1
Fixed errors in the documentation. Nobody likes errors in the documentation :).