isoweek: Constructor for isoweek objects

View source: R/isoweek.R

isoweekR Documentation

Constructor for isoweek objects

Description

isoweek() is a constructor for ⁠<grates_isoweek>⁠ objects.

Usage

isoweek(year = integer(), week = integer())

Arguments

year

⁠[integer]⁠

Vector representing the year associated with week.

double vectors will be converted via as.integer(floor(x)).

week

⁠[integer]⁠

Vector representing the week associated with 'year.

double vectors will be converted via as.integer(floor(x)).

Details

isoweeks are defined to start on a Monday and ⁠<grates_isoweek>⁠ objects are stored as the number of weeks (starting at 0) from the first Monday prior to the Unix Epoch (1970-01-01). That is, the number of seven day periods from 1969-12-29.

Internally they have the same representation as a ⁠<grates_yearweek_monday>⁠ object so are akin to an alias but with a marginally more efficient implementation.

Value

A ⁠<grates_isoweek>⁠ object.

See Also

as_isoweek() and new_isoweek().

Examples

isoweek(year = 2000L, week = 3L)


grates documentation built on July 9, 2023, 7:09 p.m.