/.JalaliDate {RJalaliDate} | R Documentation |
Perform arithmetic operations
## S3 method for class 'JalaliDate'
x / y
x |
JalaliDate or numeric |
y |
JalaliDate or numeric |
Only +, - operators work with JalaliDate objects in some cases. If each of the two arguments are JalaliDate, the '-' operator calculates the distance of two dates (see diffdate).
JalaliDate
JalaliDate("1395/10/11") + 1
# [1] "1395/10/12"
JalaliDate("1403/08/10") - 367
# [1] "1402/08/08"
JalaliDate("1403/09/10") - JalaliDate("1403/08/10")
# [1] 30