Navigation Menu

Skip to content

Commit

Permalink
Fix handling of intra-day durations that lack the T flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Mitch Halpin authored and benfortuna committed Jul 28, 2021
1 parent 5940434 commit 1027c18
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -134,6 +134,8 @@ public static TemporalAmountAdapter parse(String value) {
}
else if (value.matches("([+-])?P.*(W|D)")) {
retVal = java.time.Period.parse(value);
} else if (value.matches("P([+-]?[0-9]*[MHS])+")) {
retVal = java.time.Duration.parse("PT" + value.substring(1));
} else {
retVal = java.time.Duration.parse(value);
}
Expand Down

0 comments on commit 1027c18

Please sign in to comment.