parse_iso_week: Converts date from week notation according to ISO 8601 to...

View source: R/parse_iso_week.R

parse_iso_weekR Documentation

Converts date from week notation according to ISO 8601 to standard notation

Description

This function returns the date of a given week-date (year, week of the year, day of week according to ISO 8601).

Usage

parse_iso_week(weekdate)

Arguments

weekdate

A character vector of year, week, and weekday in format "%Y-W%V-%u"

Details

According to ISO 8601, the year of the week can differ from the calendar year.

Value

POSIXct date vector.

Author(s)

Uwe Block u.block.mz@googlemail.com (pulled from the ISOweek package) with some edits by Stuart K. Grange.

See Also

strptime for a description of the date formats and references on ISO 8601.

Examples


w <- paste("2009-W53", 1:7, sep = "-")
tibble::tibble(weekdate = w, date = parse_iso_week(w))


skgrange/threadr documentation built on May 11, 2024, 12:16 p.m.