From b09d35b1a33a9a30044fab8bb9f8a61c64f3abd9 Mon Sep 17 00:00:00 2001 From: Vincent van Hees Date: Sat, 4 Jan 2025 11:40:46 +0100 Subject: [PATCH] avoid testing same dateformat twice #1243 --- R/g.loadlog.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/g.loadlog.R b/R/g.loadlog.R index 58ce1e5f0..ecaef058c 100644 --- a/R/g.loadlog.R +++ b/R/g.loadlog.R @@ -218,7 +218,7 @@ g.loadlog = function(loglocation = c(), coln1 = c(), colid = c(), "%y/%m/%d", "%d/%m/%y", "%m/%d/%y", "%y/%d/%m") if (dateformat_found == TRUE && dateformats_to_consider[1] != dateformat_correct) { # If found then first try that before trying anything else - dateformats_to_consider = c(dateformat_correct, dateformats_to_consider) + dateformats_to_consider = unique(c(dateformat_correct, dateformats_to_consider)) } # Detect data format in sleeplog: for (dateformat in dateformats_to_consider) {