year-quarter-day-getters {clock}R Documentation

Getters: year-quarter-day

Description

These are year-quarter-day methods for the getter generics.

Usage

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

## S3 method for class 'clock_year_quarter_day'
get_quarter(x)

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

## S3 method for class 'clock_year_quarter_day'
get_hour(x)

## S3 method for class 'clock_year_quarter_day'
get_minute(x)

## S3 method for class 'clock_year_quarter_day'
get_second(x)

## S3 method for class 'clock_year_quarter_day'
get_millisecond(x)

## S3 method for class 'clock_year_quarter_day'
get_microsecond(x)

## S3 method for class 'clock_year_quarter_day'
get_nanosecond(x)

Arguments

x

⁠[clock_year_quarter_day]⁠

A year-quarter-day to get the component from.

Value

The component.

Examples

x <- year_quarter_day(2020, 1:4)

get_quarter(x)

# Set and then get the last day of the quarter
x <- set_day(x, "last")
get_day(x)

# Start the fiscal year in November and choose the 50th day in
# each quarter of 2020
november <- 11
y <- year_quarter_day(2020, 1:4, 50, start = 11)
y

get_day(y)

# What does that map to in year-month-day?
as_year_month_day(y)

[Package clock version 0.6.0 Index]