iso-year-week-day-getters {clock}R Documentation

Getters: iso-year-week-day

Description

These are iso-year-week-day methods for the getter generics.

Usage

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

## S3 method for class 'clock_iso_year_week_day'
get_week(x)

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

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

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

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

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

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

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

Arguments

x

⁠[clock_iso_year_week_day]⁠

A iso-year-week-day to get the component from.

Value

The component.

Examples

x <- iso_year_week_day(2019, 50:52, 1:3)
x

# Get the ISO week
get_week(x)

# Gets the weekday, 1 = Monday, 7 = Sunday
get_day(x)

# Note that the ISO year can differ from the Gregorian year
iso <- iso_year_week_day(2019, 1, 1)
ymd <- as_year_month_day(iso)

get_year(iso)
get_year(ymd)

[Package clock version 0.6.0 Index]