iso8601standardise {iso8601} | R Documentation |
Standardise ISO8601 strings
Description
Standardise ISO8601 strings
Usage
iso8601standardise(x, fillmissing = TRUE, toymd = TRUE, tozulu = TRUE)
Arguments
x |
a character vector with valid ISO8601 date. time, or date-time strings. |
fillmissing |
recplace missing parts ot dates, and times with the minimum possible values. In dates this is 1, in times this is 0. |
toymd |
convert dates in year-week-weekday format, or year-day format to year-month-day format. |
tozulu |
convert times to GMT. Note that this implies |
Value
Returns a character vector with the same length as x
with the
ISO8601 strings in a standardised format. For input strings that are not a
valid ISO8601 time, date or date-time string NA
is returned and a
warning is issued.
Examples
''
x <- c("2024-01-01T12:34", "2024W011", "2024-123T13:00:00+01", "T1530", NA)
iso8601standardise(x)
iso8601standardise(x, fillmissing = FALSE)
iso8601standardise(x, toymd = FALSE)
iso8601standardise(x, tozulu = FALSE)
[Package iso8601 version 0.1.2 Index]