Learn R Programming

timefully (version 0.1.0)

ywday: Year-weekday occurrence identifier

Description

Computes a stable index for each datetime by combining the weekday (Monday = 1) with how many times that weekday has already occurred in the year. The result can be used to align data such as "third Monday" across different calendar years without depending on ISO week numbers.

Usage

ywday(datetime)

Value

Integer vector; for example, 402 denotes the second Thursday.

Arguments

datetime

POSIXct vector.