Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

Commit

Permalink
ARUHA-817 Add comment describing purpose of the pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
antban committed Jun 27, 2017
1 parent 95521b8 commit eef95f2
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public class RFC3339DateTimeValidator implements FormatValidator {
private final String errorMessage = "must be a valid date-time";

// Valid offsets are either Z or hh:mm. The format hh:mm:ss is not valid
// Pattern is used to catch situations that are not covered by {@link OffsetDateTime#parse(CharSequence)}
private final String dateTimeOffsetPattern = "^.*[Tt]\\d{2}:\\d{2}:\\d{2}.*([zZ]|([+-]\\d{2}:\\d{2}))$";
private final Pattern pattern = Pattern.compile(dateTimeOffsetPattern);
private final Optional<String> error = Optional.of(errorMessage);
Expand Down

0 comments on commit eef95f2

Please sign in to comment.