format-date | R Documentation |
Format date with dayjs JavaScript library
format_date_dayjs(format, prefix = "", suffix = "", locale = "en")
format_datetime_dayjs(
format,
prefix = "",
suffix = "",
locale = "en",
tz = NULL
)
label_format_date(format)
label_format_datetime(format, tz = NULL)
format |
Format for dates, see online documentation. |
prefix |
Character string to append before formatted value. |
suffix |
Character string to append after formatted value. |
locale |
Localization to use, for example |
tz |
Timezone to use. |
a JS
function.
library(vchartr)
### Format date
# date in french in %B %y format
vchart(eco2mix) %>%
v_line(aes(date, solar)) %>%
v_scale_x_date(
date_labels = format_date_dayjs("MMMM YY", locale = "fr")
)
# date in arabic in %A %d %b %Y format
vchart(eco2mix) %>%
v_line(aes(date, solar)) %>%
v_scale_x_date(
date_labels = format_date_dayjs("dddd D MMM YYYY", locale = "ar")
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.