# example with difftimes (when you only care about days of change)
x <- as.parttime("2019-06-23 04:33:21.123")
y <- as.parttime("2018-02-08 12:59:28.987")
diff_fields <- vctrs::field(x, "pttm_mat") - vctrs::field(y, "pttm_mat")
parttime:::reflow_fields(diff_fields)
# if we want to assume 0.25 leap days per year
parttime:::reflow_fields(diff_fields, days = TRUE)
# if we want to assert that there were no leap days
parttime:::reflow_fields(diff_fields, days = 0)
Run the code above in your browser using DataLab