year-month-weekday-getters: Getters: year-month-weekday

Description Usage Arguments Value Examples

Description

These are year-month-weekday methods for the getter generics.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
## S3 method for class 'clock_year_month_weekday'
get_year(x)

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

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

## S3 method for class 'clock_year_month_weekday'
get_index(x)

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

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

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

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

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

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

Arguments

x

[clock_year_month_weekday]

A year-month-weekday to get the component from.

Value

The component.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
monday <- clock_weekdays$monday
thursday <- clock_weekdays$thursday

x <- year_month_weekday(2019, 1, monday:thursday, 1:4)
x

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

# Gets the index indicating which instance of that particular weekday
# it is in the current month (i.e. the "1st Monday of January, 2019")
get_index(x)

clock documentation built on April 23, 2021, 1:06 a.m.