pub enum Rule {
Show 35 variants
EOI,
WHITESPACE,
date_expression,
relative_day_and_specific_time,
relative_date,
relative_term,
specific_day_and_time,
specific_day,
specific_time,
future_time,
next_or_last,
hour,
minute,
am_pm,
number,
time_unit,
monday,
tuesday,
wednesday,
thursday,
friday,
saturday,
sunday,
tomorrow,
today,
yesterday,
next,
this,
last,
am,
pm,
day_s,
week_s,
month_s,
year_s,
}
Variants§
EOI
End-of-input
WHITESPACE
Whitespace or tab
date_expression
Parses a full date expression, which could be a relative date, specific day and time, or a future time phrase.
- Examples: “next Monday”, “tomorrow at 3:00 PM”, “in 2 days”
relative_day_and_specific_time
Parses relative day expressions combined with specific times, such as “tomorrow at 4:00 PM”.
relative_date
Parses expressions for relative dates, for example, “next Tuesday” or “last Friday”.
relative_term
Parses terms representing days relative to today, including “tomorrow”, “today”, and “yesterday”.
specific_day_and_time
Parses expressions that specify both a day and a time, for example, “Wednesday at 5:00 AM”.
specific_day
Parses specific days of the week, with case-insensitive options.
specific_time
Parses a specific time expression, including hour, minute, and AM/PM notation.
future_time
Parses future time expressions, such as “in 3 days” or “in 2 weeks”.
next_or_last
Matches relative terms for dates, allowing “next”, “last”, and “this” qualifiers.
hour
Parses a valid hour value as a sequence of digits.
minute
Parses a valid minute value as a sequence of digits.
am_pm
Parses AM/PM markers, with case-insensitive options.
number
Parses a sequence of digits representing a number for time units.
time_unit
Matches time unit expressions in singular or plural form (for example, “day” or “days”).
monday
Day of the week: Monday or monday (case-insensitive).
tuesday
Day of the week: Tuesday or tuesday (case-insensitive).
wednesday
Day of the week: Wednesday or wednesday (case-insensitive).
thursday
Day of the week: Thursday or thursday (case-insensitive).
friday
Day of the week: Friday or friday (case-insensitive).
saturday
Day of the week: Saturday or saturday (case-insensitive).
sunday
Day of the week: Sunday or sunday (case-insensitive).
tomorrow
Relative term: Tomorrow or tomorrow (case-insensitive).
today
Relative term: Today or today (case-insensitive).
yesterday
Relative term: Yesterday or yesterday (case-insensitive).
next
Relative direction term: Next or next (case-insensitive).
this
Relative direction term: This or this (case-insensitive).
last
Relative direction term: Last or last (case-insensitive).
am
Time of day marker: AM or am (case-insensitive).
pm
Time of day marker: PM or pm (case-insensitive).
day_s
Singular or plural form of “day”.
week_s
Singular or plural form of “week”.
month_s
Singular or plural form of “month”.
year_s
Singular or plural form of “year”.