dateparser is a smart and high-performance date parser library, it supports hundreds of different formats, nearly all format that we may used. And this is also a showcase for "retree" algorithm.
MIT License
95
stars
23
forks
source link
Fixed issue #19: Exception when non-zero minutes negative time zone.... #20
The commit has fix for: Negative time zone with non-zero minutes raise an error: "Zone offset minutes and seconds must be negative because hours is negative"
(DateBuilder.java)
method toOffsetDateTime() When parsed time zone is negative, it is also expected to have negative number of minutes. The method ZoneOffset.ofHoursMinutes(..) accepts negative offset with negative minutes only. The method ZoneOffset.ofHoursMinutes(..) raise an exception when hours are negative and minutes are positive. Solution: remove Math.abs(..) from minutes parameter.
(DateParserTest.java)
Add test cases for negative time zone with non-zero minutes.
The commit has fix for: Negative time zone with non-zero minutes raise an error: "Zone offset minutes and seconds must be negative because hours is negative"
(DateBuilder.java)
(DateParserTest.java)