is_valid_date_elements: validation JalaliDate elements

View source: R/26_jalalidate_other_functions.R

is_valid_date_elementsR Documentation

validation JalaliDate elements

Description

check validation of Jalali date elements and returns results

Usage

is_valid_date_elements(year, month, day, ...)

Arguments

year

double

month

double

day

double

...

passing options ("MIN_YEAR" and/or "MAX_YEAR") to override package options (jdopt_get_options)

Details

type of message are:

  • "y": year is not valid

  • "m": month is not valid

  • "d1": day must be between 0 to 31

  • "d2": in the last 6 months of the year, the day should not be more than 30

  • "d3": in leap years, the day should not be 30

Value

list of validation result and related message

Examples

is_valid_date_elements(c(1402, 1000), c(12, 13), c(10, 11), MIN_YEAR=100)
# $result
# [1]  TRUE FALSE
#
# $message
# [1] ""  "m"

RJalaliDate documentation built on Sept. 11, 2024, 8:26 p.m.