Operators performing arithmetic operations.
Usage
# S4 method for class 'RataDie,RataDie'
Arith(e1, e2)
# S4 method for class 'numeric,RataDie'
Arith(e1, e2)
# S4 method for class 'RataDie,numeric'
Arith(e1, e2)
Value
A logical
vector.
Details
Rata die will be converted to a plain numeric
vector if a computation no
longer makes sense in temporal terms.
See also
Other fixed date tools:
as_date()
,
as_decimal()
,
as_fixed()
,
as_year()
,
fixed()
,
fixed_gregorian
,
fixed_julian
,
format()
,
pretty()
Examples
## Vectors of years
x <- fixed(c(-350, 31, 1072, 576, 1130), calendar = CE())
y <- fixed(c(1494, 1645, -869, 1440, 1851), calendar = CE())
## Move forward in time
x + y
#> Rata die: number of days since 01-01-01 (Gregorian)
#> [1] 417109 611418 73414 735599 1088058
## Move backward in time
x - y
#> Rata die: number of days since 01-01-01 (Gregorian)
#> [1] -673507 -589502 708936 -315569 -263340
## Not rata die anymore
x * y
#> [1] -69907940292 6579840680 -124300159175 110380523760 278630563941