Cast year. A calendar year as per XMLSchema gYear. Usual lexical representation is: YYYY.

types.castYear(format, value)

Arguments

format

no options (other than the default)

value

year to cast

See also

Examples

types.castYear(format = "default", value = 2000)
#> [1] 2000
types.castYear(format = "default", value = "2010")
#> [1] 2010