Index
All Classes and Interfaces|All Packages
B
- build() - Method in class io.github.hashadex.naturaldateinput.parsers.Parser.ParsedComponentBuilder
-
Builds a new instance of
ParsedComponent
using fields that can be set withParser.ParsedComponentBuilder.date(LocalDate)
,Parser.ParsedComponentBuilder.time(LocalTime)
andParser.ParsedComponentBuilder.dateTime(LocalDateTime)
.
C
- ChronoUnitLaterParser - Class in io.github.hashadex.naturaldateinput.parsers.templates
-
Base for language parsers that handle date/time expressions in the form of
"in <amount> <timeunit>"
, for example "in 10 days". - ChronoUnitLaterParser(String, Map<String, ChronoUnit>) - Constructor for class io.github.hashadex.naturaldateinput.parsers.templates.ChronoUnitLaterParser
-
Constructs the parser without cardinal number support and default regex flags.
- ChronoUnitLaterParser(String, Map<String, ChronoUnit>, Map<String, Integer>) - Constructor for class io.github.hashadex.naturaldateinput.parsers.templates.ChronoUnitLaterParser
-
Constructs the parser with cardinal number support and default regex flags.
- ChronoUnitLaterParser(String, Map<String, ChronoUnit>, Map<String, Integer>, int) - Constructor for class io.github.hashadex.naturaldateinput.parsers.templates.ChronoUnitLaterParser
-
Constructs the parser with cardinal number support and custom regex flags.
- components() - Method in class io.github.hashadex.naturaldateinput.ParsingConfiguration.ParseResult
-
Returns a list of
ParsedComponents
from which the date and time of thisParseResult
were extracted.
D
- date() - Method in class io.github.hashadex.naturaldateinput.parsers.Parser.ParsedComponent
-
Returns the parsed date if the parser was able to parse a date from the regex match.
- date() - Method in class io.github.hashadex.naturaldateinput.ParsingConfiguration.ParseResult
-
Returns the date extracted from the latest (by occurrence in source string)
ParsedComponent
that contains a date. - date(LocalDate) - Method in class io.github.hashadex.naturaldateinput.parsers.Parser.ParsedComponentBuilder
-
Sets the date field that the
ParsedComponent
is going to be created with. - dateTime(LocalDateTime) - Method in class io.github.hashadex.naturaldateinput.parsers.Parser.ParsedComponentBuilder
-
Sets both date and time fields that the
ParsedComponent
is going to be created with. - DAY_MONTH - Enum constant in enum class io.github.hashadex.naturaldateinput.parsers.common.SlashDateFormatParser.DayMonthOrder
-
"Little endian" order, used in the DMY format.
E
- ENChronoUnitLaterParser - Class in io.github.hashadex.naturaldateinput.parsers.en
-
English parser that handles expressions like "in 10 days".
- ENChronoUnitLaterParser() - Constructor for class io.github.hashadex.naturaldateinput.parsers.en.ENChronoUnitLaterParser
-
Constructs the parser.
- ENDayMonthYearParser - Class in io.github.hashadex.naturaldateinput.parsers.en
-
English parser that handles day-month-year dates like "3rd of August, 2025".
- ENDayMonthYearParser() - Constructor for class io.github.hashadex.naturaldateinput.parsers.en.ENDayMonthYearParser
-
Constructs the parser.
- endIndex() - Method in class io.github.hashadex.naturaldateinput.parsers.Parser.ParsedComponent
-
Returns the end index of the regex match from which the date/time were parsed.
- ENMonthDayYearParser - Class in io.github.hashadex.naturaldateinput.parsers.en
-
English parser that handles month-day-year dates like "August 3rd, 2025".
- ENMonthDayYearParser() - Constructor for class io.github.hashadex.naturaldateinput.parsers.en.ENMonthDayYearParser
-
Constructs the parser
- ENParsingConfiguration - Class in io.github.hashadex.naturaldateinput
-
English
ParsingConfiguration
that contains all English parsers and all common parsers. - ENParsingConfiguration(SlashDateFormatParser.DayMonthOrder) - Constructor for class io.github.hashadex.naturaldateinput.ENParsingConfiguration
-
Constructs the configuration and sets the preferred day-month order for the
SlashDateFormatParser
. - ENRelativeWordParser - Class in io.github.hashadex.naturaldateinput.parsers.en
-
English parser that handles relative words like "today", "tomorrow" and "yesterday".
- ENRelativeWordParser() - Constructor for class io.github.hashadex.naturaldateinput.parsers.en.ENRelativeWordParser
-
Constructs the parser.
- ENTimeOfDayWordParser - Class in io.github.hashadex.naturaldateinput.parsers.en
-
English parser that handles time-of-day words like "morning" and "noon".
- ENTimeOfDayWordParser() - Constructor for class io.github.hashadex.naturaldateinput.parsers.en.ENTimeOfDayWordParser
-
Constructs the parser.
- ENTwelveHourTimeParser - Class in io.github.hashadex.naturaldateinput.parsers.en
-
English parser that handles 12-hour time in the format HH:MM:SS AM/PM.
- ENTwelveHourTimeParser() - Constructor for class io.github.hashadex.naturaldateinput.parsers.en.ENTwelveHourTimeParser
-
Constructs the parser.
- ENWeekdayParser - Class in io.github.hashadex.naturaldateinput.parsers.en
-
English parser that handles expressions like "on sunday", "on the next friday".
- ENWeekdayParser() - Constructor for class io.github.hashadex.naturaldateinput.parsers.en.ENWeekdayParser
-
Constructs the parser.
- ENYearMonthDayParser - Class in io.github.hashadex.naturaldateinput.parsers.en
-
English parser that handles year-month-day dates like "2025 August 3rd".
- ENYearMonthDayParser() - Constructor for class io.github.hashadex.naturaldateinput.parsers.en.ENYearMonthDayParser
-
Constructs the parser.
- equals(Object) - Method in class io.github.hashadex.naturaldateinput.parsers.Parser.ParsedComponent
-
Compares this
ParsedComponent
to the specified object. - equals(Object) - Method in class io.github.hashadex.naturaldateinput.ParsingConfiguration.ParseResult
-
Compares this
ParseResult
to the specified object.
H
- hashCode() - Method in class io.github.hashadex.naturaldateinput.parsers.Parser.ParsedComponent
-
Returns the hash code for this
ParsedComponent
. - hashCode() - Method in class io.github.hashadex.naturaldateinput.ParsingConfiguration.ParseResult
-
Returns the hash code for this
ParseResult
. - HourMinuteSecondParser - Class in io.github.hashadex.naturaldateinput.parsers.templates
-
Base for parsers that handle time in formats like HH:MM:SS with support for AM/PM.
- HourMinuteSecondParser(String) - Constructor for class io.github.hashadex.naturaldateinput.parsers.templates.HourMinuteSecondParser
-
Constructs the parser using default regex flags.
- HourMinuteSecondParser(String, int) - Constructor for class io.github.hashadex.naturaldateinput.parsers.templates.HourMinuteSecondParser
-
Constructs the parser using custom regex flags.
I
- io.github.hashadex.naturaldateinput - package io.github.hashadex.naturaldateinput
- io.github.hashadex.naturaldateinput.parsers - package io.github.hashadex.naturaldateinput.parsers
- io.github.hashadex.naturaldateinput.parsers.common - package io.github.hashadex.naturaldateinput.parsers.common
- io.github.hashadex.naturaldateinput.parsers.en - package io.github.hashadex.naturaldateinput.parsers.en
- io.github.hashadex.naturaldateinput.parsers.templates - package io.github.hashadex.naturaldateinput.parsers.templates
- isEmpty() - Method in class io.github.hashadex.naturaldateinput.ParsingConfiguration.ParseResult
-
Checks if this
ParseResult
contains neither time or date. - ISODateParser - Class in io.github.hashadex.naturaldateinput.parsers.common
-
Parser for the ISO 8601 (YYYY-MM-DD) date format.
- ISODateParser() - Constructor for class io.github.hashadex.naturaldateinput.parsers.common.ISODateParser
-
Constructs the parser.
- isPresent() - Method in class io.github.hashadex.naturaldateinput.ParsingConfiguration.ParseResult
-
Checks if this
ParseResult
contains a time or a date.
L
- length() - Method in class io.github.hashadex.naturaldateinput.parsers.Parser.ParsedComponent
-
Returns the length of the regex match from which the date/time were parsed.
M
- MONTH_DAY - Enum constant in enum class io.github.hashadex.naturaldateinput.parsers.common.SlashDateFormatParser.DayMonthOrder
-
"Middle endian" order, used in the YMD and MDY formats.
- MonthNameParser - Class in io.github.hashadex.naturaldateinput.parsers.templates
-
Base for language parsers that handle date expressions containing a month name, like "August 3rd, 2025".
- MonthNameParser(String, Map<String, Month>) - Constructor for class io.github.hashadex.naturaldateinput.parsers.templates.MonthNameParser
-
Constructs the parser using default regex flags.
- MonthNameParser(String, Map<String, Month>, int) - Constructor for class io.github.hashadex.naturaldateinput.parsers.templates.MonthNameParser
-
Constructs the parser using custom regex flags.
P
- parse(String) - Method in class io.github.hashadex.naturaldateinput.parsers.Parser
-
Parses the provided string using
LocalDateTime.now()
as reference. - parse(String) - Method in class io.github.hashadex.naturaldateinput.ParsingConfiguration
-
Parses the provided string using
LocalDateTime.now()
as reference datetime with allParsers
in the configuration and combines returnedParsedComponents
into a singleParsingConfiguration.ParseResult
. - parse(String, LocalDateTime) - Method in class io.github.hashadex.naturaldateinput.parsers.Parser
-
Parses the provided string.
- parse(String, LocalDateTime) - Method in class io.github.hashadex.naturaldateinput.ParsingConfiguration
-
Parses the provided string using all
Parsers
in the configuration and combines returnedParsedComponents
into a singleParsingConfiguration.ParseResult
. - ParsedComponentBuilder(LocalDateTime, String, int, int) - Constructor for class io.github.hashadex.naturaldateinput.parsers.Parser.ParsedComponentBuilder
-
Constructs the builder.
- ParsedComponentBuilder(LocalDateTime, String, MatchResult) - Constructor for class io.github.hashadex.naturaldateinput.parsers.Parser.ParsedComponentBuilder
-
Constructs the builder, extracting the start and end indexes from the provided
MatchResult
. - parseMatch(MatchResult, LocalDateTime, String) - Method in class io.github.hashadex.naturaldateinput.parsers.common.ISODateParser
- parseMatch(MatchResult, LocalDateTime, String) - Method in class io.github.hashadex.naturaldateinput.parsers.common.SlashDateFormatParser
- parseMatch(MatchResult, LocalDateTime, String) - Method in class io.github.hashadex.naturaldateinput.parsers.Parser
-
Extracts match information from the provided
MatchResult
and parses it into a date and/or time. - parseMatch(MatchResult, LocalDateTime, String) - Method in class io.github.hashadex.naturaldateinput.parsers.templates.ChronoUnitLaterParser
- parseMatch(MatchResult, LocalDateTime, String) - Method in class io.github.hashadex.naturaldateinput.parsers.templates.HourMinuteSecondParser
- parseMatch(MatchResult, LocalDateTime, String) - Method in class io.github.hashadex.naturaldateinput.parsers.templates.MonthNameParser
- parseMatch(MatchResult, LocalDateTime, String) - Method in class io.github.hashadex.naturaldateinput.parsers.templates.RelativeWordParser
- parseMatch(MatchResult, LocalDateTime, String) - Method in class io.github.hashadex.naturaldateinput.parsers.templates.TimeOfDayWordParser
- parseMatch(MatchResult, LocalDateTime, String) - Method in class io.github.hashadex.naturaldateinput.parsers.templates.WeekdayParser
- Parser - Class in io.github.hashadex.naturaldateinput.parsers
-
Base abstract class for all parsers.
- Parser(String) - Constructor for class io.github.hashadex.naturaldateinput.parsers.Parser
-
Constructs the class and compiles the provided
regex
usingPattern.compile(String, int)
with the default match flags, which areCASE_INSENSITIVE
,UNICODE_CASE
andCOMMENTS
. - Parser(String, int) - Constructor for class io.github.hashadex.naturaldateinput.parsers.Parser
-
Constructs the class and compiles the provided
regex
usingPattern.compile(String, int)
with the providedflags
. - Parser.ParsedComponent - Class in io.github.hashadex.naturaldateinput.parsers
-
Immutable data class that represents one parsed regex match.
- Parser.ParsedComponentBuilder - Class in io.github.hashadex.naturaldateinput.parsers
-
Protected builder for
ParsedComponents
which can only be accessed byParser
and its subclasses. - ParsingConfiguration - Class in io.github.hashadex.naturaldateinput
-
Base abstract class for parsing configurations.
- ParsingConfiguration(Set<Parser>) - Constructor for class io.github.hashadex.naturaldateinput.ParsingConfiguration
-
Constructs a ParsingConfiguration containing the specified
Set
ofParsers
. - ParsingConfiguration.ParseResult - Class in io.github.hashadex.naturaldateinput
-
Immutable data class representing a final result of parsing using a parsing configuration, combined from multiple
ParsedComponents
. - pattern - Variable in class io.github.hashadex.naturaldateinput.parsers.Parser
-
Compiled regex, used by
parse
.
R
- reference() - Method in class io.github.hashadex.naturaldateinput.parsers.Parser.ParsedComponent
-
Returns the reference datetime used by the parser, which is usually the datetime when the string was parsed.
- reference() - Method in class io.github.hashadex.naturaldateinput.ParsingConfiguration.ParseResult
-
Returns the reference datetime used during the parsing operation.
- RelativeWordParser - Class in io.github.hashadex.naturaldateinput.parsers.templates
-
Base for language parsers that handle relative words like "today" and "tomorrrow".
- RelativeWordParser(String, Map<String, Integer>) - Constructor for class io.github.hashadex.naturaldateinput.parsers.templates.RelativeWordParser
-
Constructs the parser with default regex flags.
- RelativeWordParser(String, Map<String, Integer>, int) - Constructor for class io.github.hashadex.naturaldateinput.parsers.templates.RelativeWordParser
-
Constructs the parser with custom regex flags.
S
- SlashDateFormatParser - Class in io.github.hashadex.naturaldateinput.parsers.common
-
Parser
for DMY and MDY dates, such as 31.12.2025 and 6/20/2020. - SlashDateFormatParser(SlashDateFormatParser.DayMonthOrder) - Constructor for class io.github.hashadex.naturaldateinput.parsers.common.SlashDateFormatParser
-
Constructs the parser and sets the preferred day-month order.
- SlashDateFormatParser.DayMonthOrder - Enum Class in io.github.hashadex.naturaldateinput.parsers.common
-
Order in which day and month is placed.
- source() - Method in class io.github.hashadex.naturaldateinput.parsers.Parser.ParsedComponent
-
Returns the source string in which the parser had found and successfully parsed a certain date/time format.
- source() - Method in class io.github.hashadex.naturaldateinput.ParsingConfiguration.ParseResult
-
Returns the source string used during the parsing operation.
- startIndex() - Method in class io.github.hashadex.naturaldateinput.parsers.Parser.ParsedComponent
-
Returns the start index of the regex match from which the date/time were parsed.
T
- text() - Method in class io.github.hashadex.naturaldateinput.parsers.Parser.ParsedComponent
-
Returns the text of the regex match from which the date/time were parsed.
- time() - Method in class io.github.hashadex.naturaldateinput.parsers.Parser.ParsedComponent
-
Returns the parsed time if the parser was able to parse a time from the regex match.
- time() - Method in class io.github.hashadex.naturaldateinput.ParsingConfiguration.ParseResult
-
Returns the time extracted from the latest (by occurrence in source string)
ParsedComponent
that contains a time. - time(LocalTime) - Method in class io.github.hashadex.naturaldateinput.parsers.Parser.ParsedComponentBuilder
-
Sets the time field that the
ParsedComponent
is going to be created with. - TimeOfDayWordParser - Class in io.github.hashadex.naturaldateinput.parsers.templates
-
Base for language parsers that handle time-of-day words like "morning", "noon".
- TimeOfDayWordParser(String, Map<String, LocalTime>) - Constructor for class io.github.hashadex.naturaldateinput.parsers.templates.TimeOfDayWordParser
-
Constructs the parser using default regex flags.
- TimeOfDayWordParser(String, Map<String, LocalTime>, int) - Constructor for class io.github.hashadex.naturaldateinput.parsers.templates.TimeOfDayWordParser
-
Constructs the parser using custom regex flags.
- toRegexAlternate(Collection<String>) - Static method in class io.github.hashadex.naturaldateinput.parsers.Parser
-
Joins a
Collection
of strings into a single string, where all elements of the collection are separated by a regex alternate symbol (|
). - toString() - Method in class io.github.hashadex.naturaldateinput.parsers.Parser.ParsedComponent
-
Returns a string representation of this
ParsedComponent
. - toString() - Method in class io.github.hashadex.naturaldateinput.ParsingConfiguration.ParseResult
-
Returns a string representation of this
ParseResult
- TwentyFourHourTimeParser - Class in io.github.hashadex.naturaldateinput.parsers.common
-
Parser
for parsing twenty-four hour time, with or without seconds, like"22:20:48"
. - TwentyFourHourTimeParser() - Constructor for class io.github.hashadex.naturaldateinput.parsers.common.TwentyFourHourTimeParser
-
Constructs the parser.
V
- valueOf(String) - Static method in enum class io.github.hashadex.naturaldateinput.parsers.common.SlashDateFormatParser.DayMonthOrder
-
Returns the enum constant of this class with the specified name.
- values() - Static method in enum class io.github.hashadex.naturaldateinput.parsers.common.SlashDateFormatParser.DayMonthOrder
-
Returns an array containing the constants of this enum class, in the order they are declared.
W
- WeekdayParser - Class in io.github.hashadex.naturaldateinput.parsers.templates
-
Base for language parsers that handle expressions like "on wednesday", "on the next saturday".
- WeekdayParser(String, Map<String, DayOfWeek>) - Constructor for class io.github.hashadex.naturaldateinput.parsers.templates.WeekdayParser
-
Constructs the parser using default regex flags.
- WeekdayParser(String, Map<String, DayOfWeek>, int) - Constructor for class io.github.hashadex.naturaldateinput.parsers.templates.WeekdayParser
-
Constructs the parser using custom regex flags.
All Classes and Interfaces|All Packages