Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
TimeOfDay TimeOfDay
Weekdays []time.Weekday // empty = Mon..Fri; others are weekends
NightCutoffMinutes int // 0 = off; if now < cutoff, relative offsets ≥1 are shifted by -1
}
Config holds date-parsing parameters.
type DateLanguage ¶
DateLanguage parses language-specific temporal expressions.
func NewDateLanguage ¶
func NewDateLanguage(lang string) DateLanguage
NewDateLanguage returns a DateLanguage for the given language code. Falls back to Russian for unknown languages.
type Dateparser ¶
type Dateparser struct {
// contains filtered or unexported fields
}
Dateparser parses deadline expressions using a language-aware module.
func New ¶
func New(cfg Config, lang DateLanguage) *Dateparser
New creates a Dateparser for the given config and language.
Click to show internal directories.
Click to hide internal directories.