Releases: brick/date-time
Releases · brick/date-time
0.2.3
✨ New method
🔧 Fix
- Added missing
ext-json
requirement in composer.json
0.2.2
🐛 Bug fix
LocalDateTime::plusDuration()
and LocalDateTime::minusDuration()
could return the wrong day. (#25)
Thanks @JodyLognoul!
0.2.1
✨ New methods
LocalDateRange::intersectsWith()
LocalDateRange::getIntersectionWith()
Thanks @solodkiy!
0.2.0
💥 Breaking changes
- most of the project classes are now
final
(#8)
- the following deprecated methods have been removed:
LocalDateRange::getStartDate()
- use getStart()
instead (#13)
LocalDateRange::getEndDate()
- use getEnd()
instead (#13)
Duration::ofMilliseconds()
- use ofMillis()
instead
0.1.16
✨ New methods
LocalDateRange::getStart()
- deprecates getStartDate()
LocalDateRange::getEnd()
- deprecates getEndDate()
💩 Deprecations
LocalDateRange::getStartDate()
is now deprecated and will be removed in 0.2.0
.
LocalDateRange::getEndDate()
is now deprecated and will be removed in 0.2.0
.
This makes LocalDateRange
consistent with YearMonthRange
.
0.1.15
🛠 Improvement
The following classes now implement JsonSerializable
(#19):
DayOfWeek
Duration
Instant
Interval
LocalDate
LocalDateRange
LocalDateTime
LocalTime
Month
MonthDay
Period
Year
YearMonth
YearMonthRange
YearWeek
ZonedDateTime
Thanks to @kagmole!
0.1.14
✨ New methods
Duration::toDays()
Duration::toDaysPart()
Duration::toHours()
Duration::toHoursPart()
Duration::toMinutes()
Duration::toMinutesPart()
Duration::toSeconds()
Duration::toSecondsPart()
Duration::toMillis()
Duration::toMillisPart()
Duration::toNanos()
Duration::toNanosPart()
Duration::ofNanos()
See #15 for more information.
💩 Deprecations
Duration::ofMilliseconds()
is now ofMillis()
; ofMilliseconds()
is now deprecated and will be removed in 0.2.0
.
0.1.13
New methods
LocalDateTime::isFuture()
LocalDateTime::isPast()
These methods return whether a local date-time is in the future or in the past, in a given time-zone.
0.1.12
New methods
Instant::withEpochSecond()
returns a copy of the Instant
with the epoch second altered
Instant::withNano()
returns a copy of the Instant
with the nano-of-second altered
0.1.11
New class: YearMonthRange
.