Releases: bdkosher/goodtimes
Releases · bdkosher/goodtimes
Static parse methods and new >> operator
Breaking Changes
- Replaced the binary
-
operator with>>
for generating aPeriod
orDuration
from two instances of the samejava.time
type. The Java 8 Date/Time API defines aminus(TemporalAmount a)
method on these types that was causing conflicts with the Goodtimes version ofminus
.
API Enhancements
- Added static
parse(CharSequence input, String format)
methods on the parseable java.time types - Added
toOffsetTime()
method tojava.util.Date
andjava.util.Calendar
- Added
getZoneId()
andgetZoneOffset()
properties tojava.util.Date
- Added
toZoneOffset()
methods tojava.util.TimeZone
- Added
isWeekend()
andisWeekday()
properties toDayOfWeek
- Added
leftShift(Year year)
method toMonth
to complement theleftShift(Month month)
method onYear
- Added
asType()
method toMonth
andDayOfWeek
for coersion into numeric types according to theirgetValue()
, as also supported byYear
- Overloaded the
toZonedDateTime()
method onjava.util.Date
andjava.util.Calendar
to accept an optionalZoneId
orTimeZone
argument
Bug fixes
- Milliseconds incorrect when generating
java.time
types with a time element (e.g.LocalTime
) fromjava.util.Date
orjava.util.Calendar
- Afternoon hours incorrect when generating
java.time
types with a time element (e.g.LocalTime
) fromjava.util.Date
orjava.util.Calendar
- The
toDate()
method ofOffsetTime
not converting time values according to the system default offset.
Zone and Offset-Aware
- New methods for the zone/offset-aware types:
OffsetTime
,OffsetDateTime
,ZoneId
,ZoneOffset
,ZonedDateTime
- Switched Groovy dependency to
compileOnly
to avoid downloading a superfluous copy ofgroovy-all
when not using Groovy 2.4.8 getMonthDay()
added tojava.util.Calendar
getDay()
added tojava.time.MonthDay
toCalendar()
methods support a singleLocale
argument- The
minus()
method onjava.time.Year
yields aPeriod
now; theplus()
method on that type has been removed (breaking change) toDate()
methods no longer acceptLocale
orTimeZone
arguments because it doesn't make sense nor work property (breaking change)