Skip to content

Commit c3e3d99

Browse files
Update ic_date.R
Fixing ic_datetime function. This will let ic_read function to work with ics files with more than one event
1 parent d06f8fe commit c3e3d99

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/ic_date.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
ic_datetime <- function(x) {
1111

1212
# TODO (LH): regex check x timestamp
13-
if(!is.na(x) & !x == "NA" & !grepl("^\\d{8}T\\d{6}Z?$", x)) {
13+
if(any(!is.na(x) & !(x == "NA") & !grepl("^\\d{8}T\\d{6}Z?$", x))) {
1414
# stop("time should be in this format: 20180809T160000Z")
1515
warning("Non-standard time string: should be in this format: 20180809T160000Z")
1616
x = ""

0 commit comments

Comments
 (0)