cu_date_from
turns ClickUp date/time format (Unix time
in milliseconds) to POSIXct()
.
cu_date_to
turns a POSIXct coercible date/time value
back to Unix time.
Arguments
- ms
ClickUp date/time format, Unix time in milliseconds.
- tz
time zone, when
NULL
it defaults tocu_options()$tz
.- ...
Other optional arguments passed to
as.POSIXct()
.- dt
POSIXct coercible date/time value.
See also
cu_options()
to set tz
globally.
Examples
if (FALSE) {
task_id <- "8ach57"
due_date <- as.POSIXct("2020-12-24 21:15:49 MDT")
task <- cu_get_task(task_id)
task$due_date
cu_date_to(due_date)
task_up <- cu_update_task("8ach57", due_date=cu_date_to(due_date))
cu_date_from(task_up$due_date)
identical(cu_date_from(task_up$due_date), due_date)
}