app.date
Date parsing utilities for metadata fields.
Provides parse-date which attempts to parse a date string in several common formats (YYYY-MM-DD, DD/MM/YYYY, MM/DD/YYYY, etc.) and returns the original string on success or nil on failure.
parse-date
(parse-date s)Parse date from YYYY-MM-DD, DD/MM/YYYY, or MM/DD/YYYY. Returns YYYY-MM-DD string or nil.
For slash formats, tries to infer which is day vs month: - If one value > 12, assumes that’s the day (DD/MM/YYYY) - Otherwise defaults to MM/DD/YYYY (US format)
parse-date-ms
(parse-date-ms s)Parse date string and return epoch milliseconds or nil.
Uses parse-date to normalize supported formats to YYYY-MM-DD, then converts to a numeric timestamp for gradient calculations.