weekday-arithmetic: Arithmetic: weekday

Description Usage Arguments Details Value Examples

Description

These are weekday methods for the arithmetic generics.

Also check out the examples on the weekday() page for more advanced usage.

Usage

1
2
## S3 method for class 'clock_weekday'
add_days(x, n, ...)

Arguments

x

[clock_weekday]

A weekday vector.

n

[integer / clock_duration]

An integer vector to be converted to a duration, or a duration corresponding to the arithmetic function being used. This corresponds to the number of duration units to add. n may be negative to subtract units of duration.

...

These dots are for future extensions and must be empty.

Details

x and n are recycled against each other.

Value

x after performing the arithmetic.

Examples

1
2
3
4
5
saturday <- weekday(clock_weekdays$saturday)
saturday

add_days(saturday, 1)
add_days(saturday, 2)

clock documentation built on April 23, 2021, 1:06 a.m.