yearmonth: Constructor for yearmonth objects

View source: R/yearmonth.R

yearmonthR Documentation

Constructor for yearmonth objects

Description

yearmonth() is a constructor for ⁠<grates_yearmonth>⁠ objects.

Usage

yearmonth(year = integer(), month = integer())

Arguments

year

⁠[integer]⁠

Vector representing the year associated with month.

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

month

⁠[integer]⁠

Vector representing the month associated with 'year.

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

Details

⁠<grates_yearmonth>⁠ objects are stored as the number of months (starting at 0) since the Unix Epoch (1970-01-01).

Value

A ⁠<grates_yearmonth>⁠ object.

See Also

as_yearmonth() and new_yearmonth().

Examples

yearmonth(year = 2000L, month = 3L)


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