Skip to contents

Date to calendar units

Convert a date to calendar month, year, or yearmonth.

date_to_calmonth_c()
Date to calendar month (character)
date_to_calmonth_n()
Date to calendar month (numeric)
date_to_calyear_c()
Date to calendar year (character)
date_to_calyear_n()
Date to calendar year (numeric)
date_to_calyearmonth_c()
Date to calendar yearmonth (character)

Date to ISO units

Convert a date to ISO week, year, quarter, yearweek, or yearquarter.

date_to_isoweek_c()
Date to ISO week (character)
date_to_isoweek_n()
Date to ISO week (numeric)
date_to_isoyear_c()
Date to ISO year (character)
date_to_isoyear_n()
Date to ISO year (numeric)
date_to_isoquarter_c()
Date to ISO quarter (character)
date_to_isoquarter_n()
Date to ISO quarter (numeric)
date_to_isoyearweek_c()
Date to ISO yearweek (character)
date_to_isoyearquarter_c()
Date to ISO yearquarter (character)

Date to season

Convert a date to season or season week.

date_to_season_c()
Date to season (character)
date_to_seasonweek_n()
Date to season week (numeric)

ISO yearweek and ISO year conversions

Convert between ISO yearweek, ISO year, ISO quarter, season, and dates.

isoyear_to_last_date()
ISO year to last date (Sunday)
isoyear_to_last_isoweek_n()
ISO year to last ISO week (numeric)
isoyear_to_last_isoyearweek_c()
ISO year to last ISO yearweek (character)
isoyearweek_to_isoweek_c()
ISO yearweek to ISO week (character)
isoyearweek_to_isoweek_n()
ISO yearweek to ISO week (numeric)
isoyearweek_to_isoyear_c()
ISO yearweek to ISO year (character)
isoyearweek_to_isoyear_n()
ISO yearweek to ISO year (numeric)
isoyearweek_to_isoquarter_c()
ISO yearweek to ISO quarter (character)
isoyearweek_to_isoquarter_n()
ISO yearweek to ISO quarter (numeric)
isoyearweek_to_isoyearquarter_c()
ISO yearweek to ISO yearquarter (character)
isoyearweek_to_last_date()
ISO yearweek to last date (Sunday)
isoyearweek_to_season_c()
ISO yearweek to season (character)
isoyearweek_to_seasonweek_n()
ISO yearweek to season week (numeric)
isoweek_to_seasonweek_n()
ISO week to season week (numeric)

Season conversions

Convert between season, season week, ISO week, and dates.

season_to_last_date()
Season to last date (Sunday)
seasonweek_to_isoweek_c()
Season week to ISO week (character)
seasonweek_to_isoweek_n()
Season week to ISO week (numeric)

Lookup datasets

Reference datasets for ISO yearweeks and Norwegian workdays.

dates_by_isoyearweek
Dates of each weekday within ISO yearweeks
nor_workdays_by_date
Norwegian workdays and holidays by date
nor_workdays_by_isoyearweek
Norwegian workdays and holidays by ISO yearweek

Utilities

Helper functions for filtering dates and retrieving the current time.

keep_sundays()
keep_sundays
keep_sundays_and_latest_date()
keep_sundays_and_latest_date
keep_sundays_and_latest_date_internal()
keep_sundays_and_latest_date_internal
now_c()
Current time as character