Releases: brick/date-time
Releases · brick/date-time
0.1.10
0.1.9
0.1.8
0.1.7
New methods to convert to native DateTime
objects:
LocalDate::toDateTime()
LocalTime::toDateTime()
LocalDateTime::toDateTime()
This makes these methods in line with their fromDateTime()
counterparts.
Note: even though these classes represent partial date-time concepts, PHP merges all these concepts into a single DateTime
class, so it is relevant to be able to easily export them as native PHP date-times, with sensible defaults.
0.1.6
0.1.5
0.1.4
0.1.3
0.1.2
Bug fix:
Duration::multipliedBy()
could return an invalid Duration with negative nanos
New methods:
Instant::toDecimal()
returns a decimal timestamp such as123456789.123456
FixedClock::move()
allows to move the clock by a number of seconds and/or nanos
New clock implementation:
ScaleClock
makes the time move at a given pace
New feature:
- Methods such as
now()
now use the clock returned byDefaultClock
. By default, this clock is stillSystemClock
, but it can now be overridden in tests. DefaultClock offers thefreeze()
,travel()
andscale()
methods inspired by timecop.