jdopt_set_valid_separators {RJalaliDate}R Documentation

setting new valid separators

Description

changing existing set of valid separators and defining a new set

Usage

jdopt_set_valid_separators(valid_separators)

Arguments

valid_separators

character

Details

Argument of the function is a character vector that each of elements has length of 0 or 1. After changing 'VALID_SEPARATORS', if current 'DEFAULT_SEPARATOR' doesn't belong to new 'VALID_SEPARATORS', first element of new 'VALID_SEPARATORS' (after sorting) will be set as 'DEFAULT_SEPARATOR' and a message will be displayed.

Value

options list or warning

Examples

jdopt_reset()
res <- jdopt_set_valid_separators(c("+", "$"))
 #After setting new valid separators, the default separator was changed automatically!

res
# $DEFAULT_SEPARATOR
# [1] "$"
#
# $VALID_SEPARATORS
# [1] "$" "+"
#
# $MIN_YEAR
# [1] 1200
#
# $MAX_YEAR
# [1] 1500


[Package RJalaliDate version 0.1.0 Index]