Duration Php Versions Save

Working with durations made easy

4.3

2 years ago

Added support for all PHP 8.x versions

4.2

3 years ago

Added support for PHP 8.0

4.1

4 years ago
  • PHP 7.3.4 is now the minimum required version.
  • Duration now extends DateInterval and can be used interchangeably.
  • Objects having a __toString() method are now supported values.
  • Duration::toDateInterval() is now deprecated.

4.0

4 years ago
  • PHP 7.3 is now the minimum required version.
  • 0, null, false, true are now supported values as in that they result in Duration::none() (PT0S).
  • An InvalidDuration error 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

5 years ago

New DateTimeImmutable instances ignore timezones when created #3

3.0

5 years ago

The Duration class is final again (and will stay that way) #2

2.0

5 years ago

The Duration class is now extensible instead of macroable.

1.1

5 years ago
  • Thrown exceptions implement Gamez\Duration\DurationException
  • An operation resulting in an invalid duration will throw a Gamez\Duration\Exception\InvalidDuration

1.0.1

5 years ago

Fixed errors in the documentation. Nobody likes errors in the documentation :).

1.0

5 years ago

Initial release