calendar_eow: End of Week Date

View source: R/period.R

calendar_eowR Documentation

End of Week Date

Description

Returns the last day of the week from a Date given a choice of week days.

Usage

calendar_eow(date, day = 7, ...)

Arguments

date

a Date vector

day

a value between 1 (Monday) and 7 (Sunday).

...

not used

Details

Given a Date (such as 2019-01-02) and a day of 7, will return the Date for the Sunday at or immediately after that. The week starting day is Monday (1). A simple use case is when one wants to aggregate daily data to a regular weekly sequence.

Value

Date object

Author(s)

Alexios Galanos


tsaux documentation built on April 4, 2025, 3:08 a.m.