Coerce to

These functions construct and/or coerce dates to the mdate class:

new_messydate() validate_messydate()

A flexible date class for messy dates

as_messydate() mdate() make_messydate()

Coercion from regular date classes to mdate

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

Annotates dates as censored, uncertain, or approximate

new_messyduration() messyduration() validate_messyduration()

A duration class for mdates

Coerce from

These functions coerce dates from the mdate class into a single Date:

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

Coercion from messy dates

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

Resolves messy dates into a single value

Manipulation

These functions expand or contract objects of mdate class from/into a list:

expand()

Expand messy dates to lists of dates

contract()

Contract lists of dates into messy dates

Operations

These methods help operate on objects of the mdate class:

`+`(<mdate>) `-`(<mdate>)

Arithmetic operations for messydates

`%intersect%` `%union%`

Set operations for messy dates

is_messydate() is_intersecting() is_subset() is_similar() is_precise() is_uncertain() is_approximate() `<`(<mdate>) `>`(<mdate>) `<=`(<mdate>) `>=`(<mdate>)

Logical tests on messy dates

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

Extracting components from messy dates

`%l%` `%g%` `%ge%` `%le%` `%><%` `%>=<%`

Proportion of messy dates meeting logical test

Data

Working with ‘messy’ data:

mreport()

Data report for datasets with 'mdate' variables

battles

Dates of battles in 2001