iso8601: Format a time or date to an ISO8601 string.

Usage Arguments Value

Usage

1
2
iso8601(x, what = c("datetime", "timestamp", "date", "time"), tz = "",
  tz_offset = TRUE, digits = 0)

Arguments

x

a Date or POSIXt time vector.

what

[string] What type of output? "datetime" and "timestamp" are equivalent, "date" is just the date, and "time" is just the time (i.e. without date).

tz

[Olson timezone string] The desired timezone for output string presentation; same as in base:strftime(). The default (empty string) uses R's current session-set timezone. (NULL is treated identically to the empty string.)

tz_offset

[boolean] Should the timezone offset be included in the output?

digits

[integer] Subsecond digits desired in the output string, as specified by the "%OSn" format string in base::strftime(), where n is the number of digits.

Value

An ISO8601 character vector.


mmuurr/zzz documentation built on May 14, 2019, 12:46 p.m.