Skip to content

Commit 30a5119

Browse files
do change for difftime result
1 parent db86e67 commit 30a5119

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

R/IDateTime.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@ chooseOpsMethod.IDate = function(x, y, mx, my, cl, reverse) inherits(y, "Date")
129129
# ii) .Date was newly exposed in R some time after 3.4.4
130130
}
131131
ans = as.integer(unclass(e1) - unclass(e2))
132-
if (!inherits(e2, "Date")) setattr(ans, "class", c("IDate", "Date"))
132+
setattr(ans, "class", "difftime")
133+
setattr(ans, "units", "days")
133134
ans
134135
}
135136

0 commit comments

Comments
 (0)