Changelog
Source:NEWS.md
messydates 0.5.3
Components
- Improved
year()
to be faster and work on durations - Improved
precision()
-
precision()
is now a S3 generic, dispatching toprecision.mdate()
-
precision.mdate()
now returns the inverse of the previous measure, meaning maximising precision makes more sense
-
messydates 0.5.2
CRAN release: 2025-03-07
Package
- Moved
mreport()
to manydata - Consolidated and renamed scripts internally
Coerce to
- Fixed pkgdown#2855 by fixing how as_messydate methods interpret infinite dates
- Fixed time zone defaults in
as.POSIXct.mdate()
andas.POSIXlt.mdate()
- Fixed set bug in
validate_messydate()
Coerce from
- Renamed
as.numeric()
toas.double()
to fix S3 dispatching - Separated extrema functions into
min.mdate()
andmax.mdate()
for summaries andvmin.mdate()
andvmax.mdate()
for vector coercion - Separated tendency functions into
mean.mdate()
,median.mdate()
, andmodal.mdate()
for summaries andvmean.mdate()
,vmedian.mdate()
, andvmodal.mdate()
for vector coercion - Vector coercion previously in
random.mdate()
now invrandom.mdate()
- Improved how coercion/resolution functions handle BCE dates
Manipulation
- Fixed how
precision()
calculates precision
messydates 0.5.0
Package
- Dropped the vignettes as they were ‘outdated’
- Dropped a number of tests to provide rapid testing framework
- Dropped tibble dependency by just using dplyr
- Updated Github workflows
- Updated testthat to version 3, tests now run in parallel
- Updated pkgdown to bootstrap 5
- Updated DESCRIPTION with config packages
Functions
- Moved from stringr to stringi for speed
- Added
as.numeric.mdate()
andas_messydate.numeric()
for coercing between messydates and numbers (closes #85) - Added
seq.mdate()
for creating sequences from one or two messydates- This includes correct sequences for leap years and historical dates including before the common era
- Added
is_bce()
for testing whether dates are from before the common era - Added
stri_squish()
helper for trimming white space everywhere - Improved
c.mdate()
so that it will strip class from anmdate
object, as expected - Improved
is_uncertain()
andis_approximate()
so that they also recognise%
annotations - Improved
min.mdate()
,max.mdate()
, andmodal.mdate()
to avoid usingexpand()
and consequently run much faster - Improved
min.mdate()
,max.mdate()
,modal.mdate()
,mean.mdate()
,median.mdate()
, andrandom.mdate()
by addingrecursive
argument for resolving vectors down to a scalar - Fixed bug in
messyduration.mdate()
where the minimum of an underspecified later date was used - Fixed bug in
as_messydate()
where zero padding for early dates was not added correctly
messydates 0.4.1
CRAN release: 2024-04-19
Package
- The package now depends on R versions bigger or equal to 4.0 since functions for subsetting and comparing ‘mdate’ objects rely on functions introduced in that version
Functions
- Closed #83 by fixing how logical comparisons works for negative and year only dates
messydates 0.4.0
Functions
- Closed #46 by adding the
mdates_duration
class that introduces methods to annotate a duration or period with representations of its uncertainty - Closed #72 by fixing issues with double unspecified components not being contracted correctly
- Closed #73 by fixing bugs with the conversion of dates where month is spelled
- Closed #74 and #82 by adding other logical comparison operators for ‘mdate’ objects (e.g.
<
,>
,<=
,>=
) (thanks @WerthPADOH) - Closed #76 by adding proportional operators that calculate the proportion of messy dates meeting logical tests (e.g.
%l%
%le%
,%g%
,%ge%
,%><%
,%>=<%
) - Closed #77 by adding basic vector methods for subsetting and data frames (thanks @WerthPADOH)
- Added alias function
mdate()
foras_messydate()
- Renamed set family of functions to work as operators (i.e.
%intersect%
and%union%
) - Replaced
is_element()
byis_subset()
for clarity and consistency - Closed #80 by updating
make_messydates()
function to also construct ranges of dates
messydates 0.3.5
CRAN release: 2023-01-20
Functions
- Updated how
contract()
function checks if ‘mdate’ object has been expanded
messydates 0.3.4
Package
- Updated ‘battles’ internal data
- Corrected issues with zero padding for certain date ranges
- Added ‘US_party’ and ‘N_actors’ additional variables for replication purposes
Functions
- Closed #68 by updating
as_messydate()
function- Fixed bugs with zero padding for ranges of dates
- Fixed bugs with the re-ordering of months and day components for incorrectly specified dates
- Closed #69 by updating
contract()
function to ‘expand’ dates before ‘contracting’ them - Updated
expand()
function to handle, and properly convert, date objects that are not ‘mdate’
messydates 0.3.1
CRAN release: 2022-07-21
messydates 0.3.0
CRAN release: 2022-06-02
Functions
- Updated coercion to messy dates
- Closed #26 by adding “resequence” argument to
as_messydate()
allowing users to choose component order of ambiguous dates - Closed #45 by improving how
as_messydate()
re-orders 6 digit date components if necessary - Closed #48 by adding zero padding incomplete date ranges and sets of dates
- Updated
as_messydate()
to also extract dates from text strings
- Closed #26 by adding “resequence” argument to
- Added
is_precise()
function that provides a logical test for precise dates - Updated messy dates expansion
messydates 0.2.1
CRAN release: 2022-02-23
Package
- Added a vignette for working with the messydates package
Functions
- Closed #9 by adding arithmetic operations for working with
messydt
objects- Added S3 methods for “+” and “-” operators
- Added
add()
andsubtract()
helper functions for arithmetic operations
- Updated
expand()
function - Updated functions that coerce from
messydt
objects toDate
to manage negative dates- Added
negative_dates()
helper function to coerce negativemessydt
dates
- Added
- Closed #39 by updating how resolve mean methods work for negative dates
- Closed #40 by updating contract function to manage the contraction of negative dates
- Added
compact_negative_dates()
helper function to compact negative date ranges - Added
is.sequence()
as a helper function to check if dates are a range
- Added
- Updated resequence script to export
interleave()
function
messydates 0.2.0
CRAN release: 2021-11-12
Package
- Added PANARCHIC project details to README file
- Added cheatsheet
- Added a new CSS style to website and updated functions displayed
- Addressed workflow actions issues
- Updated pushrelease.yml workflow actions file to stop installing messydates from Github
- Updated README file to stop installing messydates from Github
- Fixed Codecov test coverage URL on README file for CRAN submission
Functions
- Expanded on messydates checks for class validity
- Fixed bugs for
make_messydate()
- Added annotation functions and standardized annotation so that it is consistent with ISO2019E standards.
on_or_before()
on_or_after()
as_approximate()
-
as_uncertain()
(includes discrimination between month uncertainty and day and month uncertainty)
- Updated
as_messydate()
by adding zero padding for month, day or year - Updated
resequence()
to work consistently with messydate objects - Updated
expand()
function to expand imprecise, unspecified, approximate, uncertain, and negative dates according to approximate ranges and added tests - Updated
precision()
to return the lengths of expanded dates - Updated
median()
in resolve family of functions to work with changes toexpand()
- Added tests for functions
- Added tests for
expand()
- Added tests for
contract()
- Added tests for
precision()
- Added tests for
coerce_from_messydate()
- Added tests for
messydates 0.1.0
Functions
- Updated documentation for
as_messydate()
functions - Updated documentation for
expand()
function - Updated documentation for resolve family of functions
- Updated documentation for coerce from family of functions
- Updated documentation for coerce to family of functions
messydates 0.0.1
Package
- Setup messydates package
- Added
DESCRIPTION
file - Added
R
folder - Added
LICENSE
file - Added
NAMESPACE
file - Added
NEWS
file - Added
README
files - Added
.github
folder and files - Added
tests
folder and files
- Added
- Setup pkgdown website
- Added package logo
Functions
- Added a new
messydt
class which follows the latest ISO 8601 (2019) standards- Added validation checks for messydt class
- Added print methods for messydt class
- Added
as_messydate()
function to coerce from date objects to messydate-
as_messydate()
standardises date order, separators and ambiguity - Added date class coercion
- Added POSIXct class coercion
- Added POSIXlt class coercion
- Added character class coercion
-
- Added functions to coerce from messydate objects to other date classes
- Added
as.Date.messydt()
for coercing to date class - Added
as.POSIXct.messydt()
for coercing to POSIXct class - Added
as.POSIXlt.messydt()
for coercing to POSIXlt class
- Added
- Added
expand()
function for expanding ranged and uncertain dates - Added functions to resolve expanded dates
- Added
min.messydt()
to get minimum value from expanded range - Added
max.messydt()
to get maximum value from expanded range - Added
median.messydt()
to get median value from expanded range - Added
mean.messydt()
to get mean value from expanded range - Added
modal.messydt()
to get mode value from expanded range
- Added
- Added
contract()
function for contracting expanded dates - Added extract functions to get particular date components
- Added
make_messydate()
function to get messy dates from multiple columns - Added set functions for operations in sets of messy dates
- Added
md_intersect()
to find intersection of sets of messy dates - Added
md_union()
to find union of sets of messy dates - Added
md_multiset()
to join two sets of messy dates
- Added
- Added logical function for various logical tests for messy date objects
- Added
is_messydate()
to test for messydt class - Added
is_intersecting()
to test if dates intersect - Added
is_element()
to test for multiple elements in dates - Added
is_similar()
to test for similarities in dates
- Added
- Added tests for new functions
- Added tests for messydt class and
às_messydate()
function - Added tests for coerce from messy dates functions
- Added tests for coerce to messy dates functions
- Added tests for
contract()
function - Added tests for
expand()
function - Added tests for extract functions
- Added tests for
make_messydate()
function - Added tests for resolve functions
- Added tests for set functions
- Added tests for messydt class and