cstime2025.10.13 package

Date and Time Functions for Public Health Purposes

date_to_calmonth_c

Date -> calmonth (character)

date_to_calmonth_n

Date -> calmonth (numeric)

date_to_calyear_c

Date -> calyear (character)

date_to_calyear_n

Date -> calyear (numeric)

date_to_calyearmonth_c

Date -> calyearmonth (character)

date_to_isoquarter_c

ISO quarter (character) from Date object

date_to_isoquarter_n

ISO quarter (numeric) from Date object

date_to_isoweek_c

ISO week (character) from Date object

date_to_isoweek_n

ISO week (numeric) from Date object

date_to_isoyear_c

ISO year (character) from Date object

date_to_isoyear_n

ISO year (numeric) from Date object

date_to_isoyearquarter_c

ISO year and quarter (character) from Date object

date_to_isoyearweek_c

ISO year and week (character) from Date object

date_to_season_c

Date to season.

date_to_seasonweek_n

Date to season week.

isoweek_to_seasonweek_n

ISO week to season week (numeric). Season week 1 is natural week 35.

isoyear_to_last_date

Last Sunday in ISO year

isoyear_to_last_isoweek_n

Last ISO week (numeric) in ISO year

isoyear_to_last_isoyearweek_c

Last ISO yearweek (character) in ISO year

isoyearweek_to_isoquarter_c

ISO yearweek to quarter (character)

isoyearweek_to_isoquarter_n

ISO yearweek to quarter (numeric)

isoyearweek_to_isoweek_c

ISO yearweek to week (character)

isoyearweek_to_isoweek_n

ISO yearweek to week (numeric)

isoyearweek_to_isoyear_c

ISO yearweek to year (character)

isoyearweek_to_isoyear_n

ISO yearweek to year (numeric)

isoyearweek_to_isoyearquarter_c

ISO yearweek to ISO yearquarter (character)

isoyearweek_to_last_date

Last date in ISO yearweek

isoyearweek_to_season_c

ISO yearweek to season.

isoyearweek_to_seasonweek_n

ISO yearweek to season week (numeric). Season week 1 is ISO week 35.

keep_sundays_and_latest_date_internal

keep_sundays_and_latest_date_internal

keep_sundays_and_latest_date

keep_sundays_and_latest_date

keep_sundays

keep_sundays

now_c

Current time as character

season_to_last_date

Last date in season

seasonweek_to_isoweek_c

Season week to ISO week (character). Season week 1 is ISO week 35.

seasonweek_to_isoweek_n

Season week to ISO week (numeric). Season week 1 is ISO week 35.

Provides easy and consistent time conversion for public health purposes. The time conversion functions provided here are between date, ISO week, ISO yearweek, ISO year, calendar month/year, season, season week.

  • Maintainer: Richard Aubrey White
  • License: MIT + file LICENSE
  • Last published: 2025-10-14