as.character.JalaliDate {RJalaliDate}R Documentation

data type conversion

Description

convert JalaliDate to character, Date, or list

Usage

## S3 method for class 'JalaliDate'
as.character(
  x,
  format = "A",
  separator = jdate_options("DEFAULT_SEPARATOR"),
  ...
)

## S3 method for class 'JalaliDate'
as.Date(x, ...)

## S3 method for class 'JalaliDate'
as.list(x, ...)

Arguments

x

JalaliDate object

format

character. One of c("A", "B", "C") elements:

  • "A": simple, combining Jalali date with DEFAULT_SEPARATOR

  • "B": (year) (month_name) (day)

  • "C": (year) (month_name) (day) (day_of_week)

separator

character. One of VALID_SEPARATORS (see jdopt_get_options) that converts Jalali date elements to character

...
  • "as.character": The ... argument is used to pass options that overrides current options (see examples).

  • "other": future usage

Value

character, Date, or list

Examples

as.character(JalaliDate(1), separator= "+", VALID_SEPARATORS = c("+"))

[Package RJalaliDate version 0.1.0 Index]