Description Usage Arguments Examples
View source: R/matchingTimeFormat.R
Checks if timestamps are formatted according to timeformat
1 | 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 |
1 2 3 4 5 6 7 | hasTimeFormat("1.1.2012", "%d.%m.%Y") # TRUE
hasTimeFormat("1.13.2012", "%d.%m.%Y") # FALSE
hasTimeFormat("1/31/2012", "%m/%d/%Y") # TRUE
hasTimeFormat("31/1/2012", "%m/%d/%Y") # FALSE
hasTimeFormat(c("1.1.", "1.13.", "12.12.", "32.1."), "%d.%m.")
# TRUE FALSE TRUE FALSE
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.