Construction

These functions create and print the messydt class:

new_messydate() validate_messydate() NA_messydt_

A broader date class for messy dates

make_messydate()

Make messy dates from multiple variables

on_or_before() on_or_after() as_approximate() as_uncertain()

Annotates messy dates for uncertainty and/or approximation

Coercion

These functions coerce classes to and from the messydt class:

on_or_before() on_or_after() as_approximate() as_uncertain()

Annotates messy dates for uncertainty and/or approximation

as_messydate()

Coercion to messy dates

as.Date(<messydt>) as.POSIXct(<messydt>) as.POSIXlt(<messydt>)

Coercion from messy dates

Manipulation

These functions expand objects of messydt class into a list of dates or contract from a list of dates to a messydt class:

expand()

Expand messy dates to lists of dates

contract()

Contract lists of dates into messy dates

Operations

These methods extend set, logical, and arithmetic operations to objects of messydt class:

md_intersect() md_union() md_multiset()

Set operations for messy dates

is_messydate() is_intersecting() is_element() is_similar()

Logical tests on messy dates

year() month() day() precision()

Extracting components from messy dates

Resolution

These functions resolve objects from the messydt class into a single Date or other class:

min(<messydt>) max(<messydt>) median(<messydt>) mean(<messydt>) modal() random()

Resolves messy dates into a single value

Data

Some test and/or example data:

battles

Dates of battles in 2001