Learn R Programming

shide (version 0.2.1)

sh_day: 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 jdate sh_day(x)

# S3 method for jdatetime sh_day(x)

# S3 method for jdate sh_wday(x)

# S3 method for jdatetime sh_wday(x)

# S3 method for jdate sh_qday(x)

# S3 method for jdatetime sh_qday(x)

# S3 method for jdate sh_yday(x)

# S3 method for jdatetime sh_yday(x)

sh_day(x) <- value

sh_mday(x) <- value

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

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

Value

The days component of x as an integer.

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.

Examples

Run this code
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

Run the code above in your browser using DataLab