| format.mt_time | R Documentation |
Formats a mixtime vector as a character vector, using a glue-style format
string of {lin(...)}/{cyc(...)} (or, for durations, {dur(...)}) tokens tailored to the vector's chronon
and cycle. If format is omitted, a sensible default is derived
automatically. See vignette("time-format-strings") for the format string
syntax.
## S4 method for signature 'mt_time'
format(x, ..., attr = TRUE)
## S4 method for signature 'mt_cyclical_free'
format(x, format = NULL, ..., attr = TRUE)
## S7 method for class <mixtime::mt_cyclical_free>
format(x, format = NULL, ..., attr = TRUE)
x |
A mixtime vector. |
... |
Additional arguments for methods, including |
attr |
If |
format |
A glue-style format string, defaulting to one derived
automatically for |
A character vector the same length as x.
Underspecified cyclical time (e.g. month_of_year(3)) has no position on
the time line, so only {cyc(...)} tokens can be used. Attribute tokens
such as {tz(.time)} render as empty text.
format(yearmonth("2024-03"))
format(date("2024-03-15"), format = "{cyc(day(1L), month(1L))} {lin(year(1L))}")
format(month_of_year(3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.