iso_year_week_day {clock} | R Documentation |
Calendar: iso-year-week-day
Description
iso_year_week_day()
constructs a calendar from the ISO year, week number,
and week day.
Usage
iso_year_week_day(
year,
week = NULL,
day = NULL,
hour = NULL,
minute = NULL,
second = NULL,
subsecond = NULL,
...,
subsecond_precision = NULL
)
Arguments
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 |
Details
Fields are recycled against each other using tidyverse recycling rules.
Fields are collected in order until the first NULL
field is located. No
fields after the first NULL
field are used.
Value
A iso-year-week-day calendar vector.
Examples
# 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)