sh_year {shide}R Documentation

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

Description

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

Usage

sh_year(x)

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

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

sh_year(x) <- value

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

## S3 replacement method for class 'jdatetime'
sh_year(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 year component of x as an integer.

Examples

x <- jdate("1402-12-14")
sh_year(x)
sh_year(x) <- 1400:1401

[Package shide version 0.2.1 Index]