@Test void sanitizeDateStringHeaderValueShouldRemoveUTCPart() { assertThat(SentDateComparator.sanitizeDateStringHeaderValue("Thu, 18 Jun 2015 04:09:35 +0200 (UTC) ")) .isEqualTo("Thu, 18 Jun 2015 04:09:35 +0200"); }
@VisibleForTesting static String sanitizeDateStringHeaderValue(String value) { Matcher sanitizerMatcher = DATE_SANITIZING_PATTERN.matcher(value); if (sanitizerMatcher.find()) { return value.substring(0, sanitizerMatcher.start()); } return value; }
SentDateComparator extends AbstractHeaderComparator { @VisibleForTesting static String sanitizeDateStringHeaderValue(String value) { Matcher sanitizerMatcher = DATE_SANITIZING_PATTERN.matcher(value); if (sanitizerMatcher.find()) { return value.substring(0, sanitizerMatcher.start()); } return value; } }
SentDateComparator extends AbstractHeaderComparator { @VisibleForTesting static String sanitizeDateStringHeaderValue(String value) { Matcher sanitizerMatcher = DATE_SANITIZING_PATTERN.matcher(value); if (sanitizerMatcher.find()) { return value.substring(0, sanitizerMatcher.start()); } return value; }  }
SentDateComparator extends AbstractHeaderComparator { @VisibleForTesting static String sanitizeDateStringHeaderValue(String value) { Matcher sanitizerMatcher = DATE_SANITIZING_PATTERN.matcher(value); if (sanitizerMatcher.find()) { return value.substring(0, sanitizerMatcher.start()); } return value; }  static Optional<ZonedDateTime> toISODate(String value); @Override int compare(MailboxMessage o1, MailboxMessage o2); }
SentDateComparator extends AbstractHeaderComparator { @VisibleForTesting static String sanitizeDateStringHeaderValue(String value) { Matcher sanitizerMatcher = DATE_SANITIZING_PATTERN.matcher(value); if (sanitizerMatcher.find()) { return value.substring(0, sanitizerMatcher.start()); } return value; }  static Optional<ZonedDateTime> toISODate(String value); @Override int compare(MailboxMessage o1, MailboxMessage o2); static final Comparator<MailboxMessage> SENTDATE; }