From 85edcc4dcf8edb8742f52d71f076759b17e95ca0 Mon Sep 17 00:00:00 2001 From: James McMahon Date: Tue, 14 May 2024 15:55:07 +0100 Subject: [PATCH] Document --- man/date_format.Rd | 4 ++-- man/label_date.Rd | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/man/date_format.Rd b/man/date_format.Rd index 8d3ab9e3..6de951f4 100644 --- a/man/date_format.Rd +++ b/man/date_format.Rd @@ -10,10 +10,10 @@ date_format(format = "\%Y-\%m-\%d", tz = "UTC", locale = NULL) time_format(format = "\%H:\%M:\%S", tz = "UTC", locale = NULL) } \arguments{ -\item{format}{For \code{date_format()} and \code{time_format()} a date/time format +\item{format}{For \code{label_date()} and \code{label_time()} a date/time format string using standard POSIX specification. See \code{\link[=strptime]{strptime()}} for details. -For \code{date_short()} a character vector of length 4 giving the format +For \code{label_date_short()} a character vector of length 4 giving the format components to use for year, month, day, and hour respectively.} \item{tz}{a time zone name, see \code{\link[=timezones]{timezones()}}. Defaults diff --git a/man/label_date.Rd b/man/label_date.Rd index ea06c22d..539bf5c9 100644 --- a/man/label_date.Rd +++ b/man/label_date.Rd @@ -20,10 +20,10 @@ label_timespan( ) } \arguments{ -\item{format}{For \code{date_format()} and \code{time_format()} a date/time format +\item{format}{For \code{label_date()} and \code{label_time()} a date/time format string using standard POSIX specification. See \code{\link[=strptime]{strptime()}} for details. -For \code{date_short()} a character vector of length 4 giving the format +For \code{label_date_short()} a character vector of length 4 giving the format components to use for year, month, day, and hour respectively.} \item{tz}{a time zone name, see \code{\link[=timezones]{timezones()}}. Defaults @@ -109,9 +109,9 @@ date_range <- function(start, days) { two_months <- date_range("2020-05-01", 60) demo_datetime(two_months) -demo_datetime(two_months, labels = date_format("\%m/\%d")) -demo_datetime(two_months, labels = date_format("\%e \%b", locale = "fr")) -demo_datetime(two_months, labels = date_format("\%e \%B", locale = "es")) +demo_datetime(two_months, labels = label_date("\%m/\%d")) +demo_datetime(two_months, labels = label_date("\%e \%b", locale = "fr")) +demo_datetime(two_months, labels = label_date("\%e \%B", locale = "es")) # ggplot2 provides a short-hand: demo_datetime(two_months, date_labels = "\%m/\%d")