ATFutures / calendar

R interface to iCal (.ics files)
https://atfutures.github.io/calendar/
Other
40 stars 11 forks source link

Function to convert ical datetime format into R datetime class #3

Closed Robinlovelace closed 6 years ago

Robinlovelace commented 6 years ago

I've created a placeholder - just needs filling in but clear what to do next - see ic_extract.R:

#' Convert ical datetime into R datetime
#'
#' @inheritParams ic_find
#'
#' @export
#' @examples
#' ic_datetime("20180809T160000Z")
ic_datetime <- function(x) {

  # todo: return a datetime object

}
layik commented 6 years ago

Above push is based on the premise that iCal time zone is defined separately.

layik commented 6 years ago

That is ‘TZID’ otherwise parsing needs to take into account the training Zone ID (if so)

https://www.kanzaki.com/docs/ical/tzid.html

Robinlovelace commented 6 years ago

Fantastic. We can always open more specific issues related to timezones and other edge cases that will likely need more if() statements of the type you added in that last commit. Awesome work!