Date-getters {clock}R Documentation

Getters: date

Description

These are Date methods for the getter generics.

For more advanced component extraction, convert to the calendar type that you are interested in.

Usage

## S3 method for class 'Date'
get_year(x)

## S3 method for class 'Date'
get_month(x)

## S3 method for class 'Date'
get_day(x)

Arguments

x

⁠[Date]⁠

A Date to get the component from.

Value

The component.

Examples

x <- as.Date("2019-01-01") + 0:5
get_day(x)

[Package clock version 0.7.0 Index]