jdate {shide}R Documentation

Jalali calendar dates

Description

jdate is an S3 class for representing the Jalali calendar dates. It can be constructed from character and numeric vectors.

Usage

jdate(x, ...)

## S3 method for class 'numeric'
jdate(x, ...)

## S3 method for class 'character'
jdate(x, format = NULL, ...)

Arguments

x

A vector of numeric or character objects.

...

Arguments passed on to further methods.

format

Format argument for character method.

Details

jdate is stored internaly as a double vector and doesn't have any attributes. Its value represents the count of days since the Unix epoch (a negative value if it represents a date prior to the epoch). This implementation coincides with the implementation of Date class.

Value

A vector of jdate objects.

Examples

jdate("1402-09-20")
jdate("1402/09/20", format = "%Y/%m/%d")
## Will replace invalid date format with NA
jdate("1402/09/20", format = "%Y-%m-%d")
## Invalid dates will be replaced with NA
jdate("1402-12-30")
## Jalali date corresponding to "1970-01-01"
jdate(0)


[Package shide version 0.2.1 Index]