Skip to contents

Test for whether a timestamp could be included within parttime uncertainty

Usage

# S3 method for partial_time
includes.partial_time(e1, e2)

Arguments

e1

object to test whether includes e2

e2

object to test whether included in e1

Value

A logical vector indicating whether partial_time

e1 includes partial_time

e2

Examples

x_chr <- c("2019", "2019-03-01", "2019-03",    "2018",    "",     "2018", "")
y_chr <- c("2019", "2019-03",    "2019-03-01", "2016-05", "2018", "",     "")

x <- as.parttime(x_chr)
#> Warning: Values could not be parsed (2 of 7 (28.6%)). Examples of unique failing
#> formats:
#> 
#>     ''  
y <- as.parttime(y_chr)
#> Warning: Values could not be parsed (2 of 7 (28.6%)). Examples of unique failing
#> formats:
#> 
#>     ''  

includes(x, y)
#> [1]  TRUE FALSE  TRUE FALSE  TRUE FALSE  TRUE