sh_day: Get/set the days components of Jalali date-time objects

View source: R/getters.R

sh_dayR Documentation

Get/set the days components of Jalali date-time objects

Description

  • sh_day() and ⁠sh_day<-()⁠ retrieves and replaces the day of the month respectively.

  • mday() and ⁠mday<-()⁠ are aliases for day() and ⁠day<-()⁠.

  • sh_wday() retrieves the day of the week.

  • sh_qday() retrieves the day of the quarter.

  • sh_yday() retrieves the day of the year.

Usage

sh_day(x)

sh_mday(x)

sh_wday(x)

sh_qday(x)

sh_yday(x)

## S3 method for class 'jdate'
sh_day(x)

## S3 method for class 'jdatetime'
sh_day(x)

## S3 method for class 'jdate'
sh_wday(x)

## S3 method for class 'jdatetime'
sh_wday(x)

## S3 method for class 'jdate'
sh_qday(x)

## S3 method for class 'jdatetime'
sh_qday(x)

## S3 method for class 'jdate'
sh_yday(x)

## S3 method for class 'jdatetime'
sh_yday(x)

sh_day(x) <- value

sh_mday(x) <- value

## S3 replacement method for class 'jdate'
sh_day(x) <- value

## S3 replacement method for class 'jdatetime'
sh_day(x) <- value

Arguments

x

A vector of jdate or jdatetime objects.

value

A numeric vector.

Details

For assignment, x and value are recycled to their common size using tidyverse recycling rules.

Value

The days component of x as an integer.

Examples

x <- jdate("1402-12-14")
sh_day(x)
sh_mday(x)
sh_qday(x)
sh_wday(x)
sh_yday(x)
sh_mday(x) <- 12:13

shide documentation built on Sept. 11, 2024, 6:37 p.m.