Skip to contents

Handler for Ops generics for partial_time objects

Usage

# S3 method for partial_time
Ops(e1, e2)

Arguments

e1

objects

e2

objects

Value

the binary operator result of partial_time

e1 with e2. See Details for more information on operator behaviors.

Details

partial_time objects only implement binary operators == and !=. For other operators, partial_times are first converted to partial_timespans for operator evaluation.

See also

possibly definitely

Examples

#                 when assume_tz "GMT"         when assume_tz NA
#                 ---------------------------  ---------------------------
#                 raw    possibly  definitely  raw   possibly  definitely
#                 -----  --------- ----------  ----- --------- -----------
#     1998 < 1999 TRUE   TRUE      TRUE        NA    TRUE      FALSE
#     1998 < 1997 FALSE  FALSE     FALSE       NA    TRUE      FALSE
#     1999 < 1999 NA     TRUE      FALSE       NA    TRUE      FALSE
# 1998 < 1999/1/3 TRUE   TRUE      TRUE        TRUE  TRUE      TRUE

parttime(1998) < parttime(1999)
#> [1] TRUE
parttime(1998) < parttime(1997)
#> [1] FALSE
parttime(1999) < parttime(1999)
#> [1] NA
parttime(1998) < parttime(1999, 1, 3)
#> [1] TRUE