Liking cljdoc? Tell your friends :D

edgar.util

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.
raw docstring

days-betweenclj

(days-between a b)

Signed number of days from LocalDate a to LocalDate b.

Signed number of days from LocalDate a to LocalDate b.
sourceraw docstring

duration-monthsclj

(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.
sourceraw docstring

filed-on-or-before?clj

(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).
sourceraw docstring

latest-filedclj

(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.
sourceraw docstring

ordered-datasetclj

(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.
sourceraw docstring

parse-dateclj

(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.
sourceraw docstring

preferred-observation?clj

(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.
sourceraw docstring

quarterly-window?clj

(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.
sourceraw docstring

window-daysclj

(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.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close