subtract_daytime: Perform subtraction on 'daytime' objects

View source: R/daytime_arithmetic.R

subtract_daytimeR Documentation

Perform subtraction on daytime objects

Description

Perform subtraction on daytime objects

Usage

subtract_daytime(e1, e2)

Arguments

e1

a POSIX-formatted x attribute from a daytime object

e2

a POSIX-formatted x attribute from a daytime object

Details

This is a decidedly internal function that is strictly a wrapper around difftime. The magic happens with Ops dispatch of the `-` operator, where the objects are checked and the original timestamps pulled out.

Value

a difftime object, in minutes

See Also

daytime:::Ops.daytime

Examples

base_time <- Sys.time()
t1 <- as_daytime(base_time)
t2 <- as_daytime(base_time + 86460)

t1 - t2
t2 - t1


paulhibbing/daytime documentation built on July 13, 2022, 6:32 p.m.