Checks if timestamps are formatted according to timeformat
hasTimeFormat(timestamps, timeformat = NULL, method = 1L)
timestamps | character strings representing timestamps. |
---|---|
timeformat | character string giving a date-time format as used by
|
method | Method used to do the check. 1: Check based on pattern matching
2: Check whether |
hasTimeFormat("1.1.2012", "%d.%m.%Y") # TRUE#> [1] TRUEhasTimeFormat("1.13.2012", "%d.%m.%Y") # FALSE#> [1] FALSEhasTimeFormat("1/31/2012", "%m/%d/%Y") # TRUE#> [1] TRUEhasTimeFormat("31/1/2012", "%m/%d/%Y") # FALSE#> [1] FALSE#> [1] TRUE FALSE TRUE FALSE# TRUE FALSE TRUE FALSE