iso_year_week_day {clock} | R Documentation |
iso_year_week_day()
constructs a calendar from the ISO year, week number,
and week day.
iso_year_week_day(
year,
week = NULL,
day = NULL,
hour = NULL,
minute = NULL,
second = NULL,
subsecond = NULL,
...,
subsecond_precision = NULL
)
year |
The ISO year. Values |
week |
The ISO week. Values If |
day |
The day of the week. Values |
hour |
The hour. Values |
minute |
The minute. Values |
second |
The second. Values |
subsecond |
The subsecond. If specified, If using milliseconds, values If using microseconds, values If using nanoseconds, values |
... |
These dots are for future extensions and must be empty. |
subsecond_precision |
The precision to interpret |
Fields are recycled against each other.
Fields are collected in order until the first NULL
field is located. No
fields after the first NULL
field are used.
A iso-year-week-day calendar vector.
# Year-week
x <- iso_year_week_day(2019:2025, 1)
x
# 2nd day of the first ISO week in multiple years
iso_days <- set_day(x, clock_iso_weekdays$tuesday)
iso_days
# What year-month-day is this?
as_year_month_day(iso_days)