1.2 KiB
1.2 KiB
006 — FilterBar datetime parsing
Summary
Support the several datetime formats the README requires for timestamp comparisons in the filter language: relative humantime, absolute time, and full dates.
Scope
- Relative humantime:
5h,-3m, etc. — resolved against "now" (or against the query's reference time, if one is introduced later) at parse/eval time. - Absolute time: e.g.
12:00(time-of-day, as in the README'stimestamp>12:00example) — needs a defined rule for which day it resolves to. - Full date: complete date(+time) literals.
- Produce a single normalized value (
Timestamp/millis) regardless of input form, for the filter evaluator (007) to compare against. - Pick and document a crate (e.g.
humantimefor the relative case) rather than hand-rolling a datetime parser.
Acceptance criteria
- Each of the three formats parses to the correct absolute millis value in unit tests, including edge cases (negative relative offsets, time-of-day near midnight).
- Ambiguous/invalid input produces a clear error rather than a silently wrong timestamp.
Depends on
None — standalone parsing module, consumed by 007 — FilterBar integration.