Learn R Programming

shide (version 0.2.1)

sh_month: Get/set the month component of Jalali date-time objects

Description

Get/set the month component of Jalali date-time objects

Usage

sh_month(x)

# S3 method for jdate sh_month(x)

# S3 method for jdatetime sh_month(x)

sh_month(x) <- value

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

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

Value

The month 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_month(x)
sh_month(x) <- 10:11

Run the code above in your browser using DataLab