Internal helpers shared by the statement, panel and validation namespaces: lenient date parsing, observation-window arithmetic, restatement deduplication and column-ordered dataset construction. Not part of the public API.
Internal helpers shared by the statement, panel and validation namespaces: lenient date parsing, observation-window arithmetic, restatement deduplication and column-ordered dataset construction. Not part of the public API.
(days-between a b)Signed number of days from LocalDate a to LocalDate b.
Signed number of days from LocalDate a to LocalDate b.
(duration-months row)Classify a duration row's window as 3, 6, 9 or 12 months, or nil when the row is instant or does not resemble a whole number of fiscal quarters. Ranges are tolerant of 52/53-week fiscal calendars.
Classify a duration row's window as 3, 6, 9 or 12 months, or nil when the row is instant or does not resemble a whole number of fiscal quarters. Ranges are tolerant of 52/53-week fiscal calendars.
(filed-on-or-before? as-of row)True when the row's :filed date is on or before as-of (ISO strings).
True when the row's :filed date is on or before as-of (ISO strings).
(latest-filed key-fn rows)Keep the most recently :filed row per (key-fn row) group (restatement deduplication; among equal :filed dates the later row wins). Returns a seq of rows in unspecified order.
Keep the most recently :filed row per (key-fn row) group (restatement deduplication; among equal :filed dates the later row wins). Returns a seq of rows in unspecified order.
(ordered-dataset rows leading-cols)(ordered-dataset rows leading-cols rank-fn)(ordered-dataset rows leading-cols rank-fn opts)Build a dataset from row maps with columns in a deterministic order: the columns named in leading-cols first (those present in the rows), then every other key, ordered by rank-fn (default: (str key)). Avoids the hash-map key order ds/->dataset otherwise inherits from wide rows.
Build a dataset from row maps with columns in a deterministic order: the columns named in leading-cols first (those present in the rows), then every other key, ordered by rank-fn (default: (str key)). Avoids the hash-map key order ds/->dataset otherwise inherits from wide rows.
(parse-date d)Parse an ISO date (string, LocalDate or anything whose str is ISO). Returns nil for nil, blank or unparseable input.
Parse an ISO date (string, LocalDate or anything whose str is ISO). Returns nil for nil, blank or unparseable input.
(preferred-observation? a b)True when observation a should replace b as the value of a wide cell: the longer window wins; for the same window length the later :filed wins.
True when observation a should replace b as the value of a wide cell: the longer window wins; for the same window length the later :filed wins.
(quarterly-window? row)True for a 3-, 6- or 9-month window. A 10-K's facts carry such quarterly-footnote windows alongside its fiscal-year figures.
True for a 3-, 6- or 9-month window. A 10-K's facts carry such quarterly-footnote windows alongside its fiscal-year figures.
(window-days row)Length in days of a row's :start..:end window; -1 for instant rows (and for unparseable dates), so any duration window outranks them.
Length in days of a row's :start..:end window; -1 for instant rows (and for unparseable dates), so any duration window outranks them.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |