Class MailDateParser
java.lang.Object
org.apache.tika.parser.mailcommons.MailDateParser
Deprecated, for removal: This API element is subject to removal in a future version.
Dates in emails are a mess. There are at least two major date related bugs in JDK 8.
And, I've found differing behavior, bug or not, between JDK 8 and JDK 11/17.
This class does its best to parse date strings. It does have a US-based date bias.
Please open a ticket to fix this as needed. We can also add overrides via the parser config
to manage customization of date formats.
This code does not spark joy especially given the diffs in behavior between jdk versions.
At some point, we should probably try joda or, heaven forfend, a pile of regexes.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DateTimeFormatterDeprecated, for removal: This API element is subject to removal in a future version.static final DateTimeFormatterDeprecated, for removal: This API element is subject to removal in a future version.static final DateTimeFormatterDeprecated, for removal: This API element is subject to removal in a future version.static final DateTimeFormatterDeprecated, for removal: This API element is subject to removal in a future version.static final DateTimeFormatterDeprecated, for removal: This API element is subject to removal in a future version.static final DateTimeFormatterDeprecated, for removal: This API element is subject to removal in a future version.static final DateTimeFormatterDeprecated, for removal: This API element is subject to removal in a future version.static final DateTimeFormatterDeprecated, for removal: This API element is subject to removal in a future version.static final DateTimeFormatterDeprecated, for removal: This API element is subject to removal in a future version.static final DateTimeFormatterDeprecated, for removal: This API element is subject to removal in a future version.static final DateTimeFormatterDeprecated, for removal: This API element is subject to removal in a future version.static final DateTimeFormatterDeprecated, for removal: This API element is subject to removal in a future version.static final DateTimeFormatterDeprecated, for removal: This API element is subject to removal in a future version.static final DateTimeFormatterDeprecated, for removal: This API element is subject to removal in a future version. -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionprotected static StringDeprecated, for removal: This API element is subject to removal in a future version.static DateparseDateLenient(String text) Deprecated, for removal: This API element is subject to removal in a future version.static DateparseRFC5322(String string) Deprecated, for removal: This API element is subject to removal in a future version.
-
Field Details
-
RFC_5322
Deprecated, for removal: This API element is subject to removal in a future version. -
RFC_5322_LENIENT
Deprecated, for removal: This API element is subject to removal in a future version. -
RFC_5322_AMPM_LENIENT
Deprecated, for removal: This API element is subject to removal in a future version. -
MMM_D_YYYY_HH_MM_AM_PM
Deprecated, for removal: This API element is subject to removal in a future version. -
MMM_D_YYYY_HH_MM
Deprecated, for removal: This API element is subject to removal in a future version. -
MM_SLASH_DD_SLASH_YY_HH_MM
Deprecated, for removal: This API element is subject to removal in a future version. -
MM_SLASH_DD_SLASH_YY_HH_MM_AM_PM
Deprecated, for removal: This API element is subject to removal in a future version. -
YYYY_MM_DD_HH_MM
Deprecated, for removal: This API element is subject to removal in a future version. -
YYYY_MM_DD
Deprecated, for removal: This API element is subject to removal in a future version. -
MM_SLASH_DD_SLASH_YYYY
Deprecated, for removal: This API element is subject to removal in a future version. -
DD_SLASH_MM_SLASH_YYYY
Deprecated, for removal: This API element is subject to removal in a future version. -
MMM_DD_YY
Deprecated, for removal: This API element is subject to removal in a future version. -
DD_MMM_YY
Deprecated, for removal: This API element is subject to removal in a future version. -
YY_SLASH_MM_SLASH_DD
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Constructor Details
-
MailDateParser
public MailDateParser()Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
parseRFC5322
Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
ParseException
-
parseDateLenient
Deprecated, for removal: This API element is subject to removal in a future version. -
normalize
Deprecated, for removal: This API element is subject to removal in a future version.
-
TikaDates.