Documentation
¶
Overview ¶
Package dateparse parses the human date and priority inputs nt accepts on the CLI and in the TUI (SPEC §7.3), kept in one place so both surfaces agree.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Date ¶
Date accepts today, tomorrow, weekday names, +Nd, and YYYY-MM-DD, optionally with a time-of-day: an ISO "YYYY-MM-DD[T ]HH:MM", or a clock appended to any of the keyword forms ("today 5pm", "fri 17:00", "tomorrow 9am"). A timed value is normalized to "YYYY-MM-DDTHH:MM". Empty / "none" / "-" clears the date (returns "", true). ok is false on an unparseable value.
func DatePart ¶ added in v0.4.0
DatePart returns the YYYY-MM-DD prefix of a (possibly time-bearing) date value, for date-granularity comparisons (agenda buckets, overdue checks).
func Duration ¶ added in v0.5.0
Duration parses a human time estimate/elapsed into whole minutes: "90m", "2h", "1h30m", "1.5h", or a bare integer (minutes). ok is false on an unparseable or negative value. Used for task est:/spent: tracking (T6).
func FmtDuration ¶ added in v0.5.0
FmtDuration renders whole minutes as a compact "1h30m" / "2h" / "45m".
Types ¶
This section is empty.