datestr_format | R Documentation |
formatting datastr by using datestr_to_ymd and ymd_to_datestr
datestr_format(
datestr,
dateformat = "%Y.%M.%D",
range_sep = "-",
na.fill = "?",
mode = "full",
Date.beg = NULL,
Date.end = NULL,
strict = TRUE,
use.range = TRUE,
use.jpera = TRUE,
use.exceldate = FALSE,
exceldate.origin = as.Date("1904-01-01")
)
datestr |
target character or sequence of character. |
dateformat |
output format with Y, M, D, y, m, d |
range_sep |
separation of range if ymd is range format. |
na.fill |
filled character for missing element. |
mode |
determining data filling mode = c("full","maximum","compact","short","minimum"). see detail. |
Date.beg |
potentially start date; used for validation and estimation. |
Date.end |
potentially end date; used for validation and estimation. |
strict |
return NA if read str is out of Date.beg-Date.end range |
use.range |
Allow range date format |
use.jpera |
Allow Japanese era case (e.g., R2.4.5 or 令和3年4月11日). |
use.exceldate |
Allow to check the value which is originally excel date but occationally transformed to normal value. |
exceldate.origin |
Origin of excel date. In default, it is 1900-01-01 if the file is originally created on Windows and 1904-01-01 on Mac. |
format of each mode is like the following. maximum: always range mode e.g., 2012.03.04-2012.03.04 2023.04.05-2023.05.06 full (default): range mode is used only when beg and end is different e.g., 2012.03.04 2023.04.05-2023.05.06 compact: range mode remove duplicating information e.g., 2023.04.05-05.06 2023.04.?? minimum: (information loss can occur depending on dateformat) remove NA and duplicating info e.g., 2023.04-05 dateformat can use the following special characters. (percent)Yj(at): NOT WORKING (percent)YJ(at): NOT WORKING (percent)Y(at): YYYY年 (percent)y(at): YY年 (percent)M(at): MM月 (percent)m(at): M月 (percent)D(at): DD日 (percent)d(at): D日 (percent)Y: YYYY (percent)y: YY (percent)M: MM (percent)m: M (percent)D: DD (percent)d: D
transformed str
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.