| text_from_datey | R Documentation |
dateyA datey is printed as either
YYYY-MM-DD, i.e. ISO 8601 extended date format, or
YYYY-MM-DD.F... where .F... is the day fraction part.
If include_day_fraction is TRUE then [.F...] is included even if it
is 0 (i.e. .0).
Note that a datey created as the end of a day (or with day fraction 1) will
print as the start of the following day.
## S3 method for class 'datey'
as.character(x, ...)
## S3 method for class 'datey'
format(x, include_day_fraction = TRUE, ...)
## S3 method for class 'datey'
print(x, include_day_fraction = TRUE, max = NULL, ...)
x |
The |
... |
Other arguments. |
include_day_fraction |
Whether to include the fractional day part.
Defaults to |
max |
Numeric or |
as.character and format return a vector of character.
print invisibly returns x.
datey
start <- start_day(2001, 2, 3)
fractional <- datey( 2001, 2, 3, day_fraction = 0.4444)
mid <- mid_day( 2001, 2, 3)
end <- end_day( 2001, 2, 3)
format(start) # "2001-02-03.0"
format(start, include_day_fraction = FALSE) # "2001-02-03"
format(fractional) # "2001-02-03.4447"
format(mid) # "2001-02-03.5"
format(end) # "2001-02-04.0"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.