is_iso_date: Check if an argument is an ISO 8601 date string

View source: R/string.R

is_iso_dateR Documentation

Check if an argument is an ISO 8601 date string

Description

Validates the YYYY-MM-DD format with calendar correctness, including leap year handling.

Usage

is_iso_date(x)

Arguments

x

(any)
Object to check.

Value

TRUE if x is a valid ISO 8601 date string, FALSE otherwise.

References

https://en.wikipedia.org/wiki/ISO_8601

Examples

is_iso_date("2024-01-15")
is_iso_date("2024-02-30")

checkstring documentation built on Sept. 28, 2026, 5:07 p.m.