ic_event {calendar} | R Documentation |
Create ical object from properties_core inputs
Description
Create an ical event using either POSIXct type or character type with format parameters.
Usage
ic_event(
uid = ic_guid(),
start_time = as.POSIXct(round.POSIXt(Sys.time(), units = "hours")),
end_time = 1,
format = "%Y-%m-%d %H:%M",
summary = "ical event",
more_properties = FALSE,
event_properties = calendar::properties
)
Arguments
uid |
the unique id of the event, by default generated by |
start_time |
start time, by default the start time plus one hour |
end_time |
a number representing the number of hours
after |
format |
required if start_time and end_time are vectors and are not of datetime format
"%Y-%m-%d %H:%M", you can use |
summary |
short outline of the event |
more_properties |
add placeholder columns for properties in addition to |
event_properties |
named vector of additional properties to include. By default
These include names stored in the data object |
Format
in case of start_time and end_time being character values, a format must be provided.
Value
object of class ics
Examples
ic_event()
s <- lubridate::ymd_h("2019-01-01 00")
ic_event(start_time = s, end_time = 3)
# also accepts this format by default, thanks to lubridate::ymd_h:
ic_event(start_time = "2019-01-01 00")
ic_event(more_properties = TRUE)
ic_event(start_time = "18-10-12", end_time = "18-10-13", format = calendar::formats$`yy-mm-dd`)