Description Usage Arguments Details Examples
View source: R/testCharacterDate.R
This function is intended to test a characters date that was recently converted from a text file.
1 2 | testCharacterDate(characterDate, testUpperLimit = 100,
testPercentPositive = 50)
|
characterDate |
the date and or time an event occured |
testUpperLimit |
number of tests to perform to validate |
testPercentPositive |
percent positive to confirm one date type |
It can extract features about the date using regular expressions
This function assumes the dateSeparator is "-", ".", or "/"
format = "american" ... date order is (1) mm (2) day (3) year format = "british" ... date order is (1) day (2) mm (3) year format = "international" ... date order is (1) year (2) mm (3) day
This function outputs a list of named parameters
dateSeparator - character used to separate dates dateTimeSeparator - chacters used to separate date and time american - is this american formatted date british - is this a British formatted date international - is this an internationl formatted date fullYear - is a full year given partialYear - is a partial year given withTime - is the time given withoutTime - is time not given formatStyle - American, British, International, or Unknown yearFormat - Full or Partial timePresent - is the time given
1 2 3 4 5 6 7 8 9 10 |
testCharacterDate("2018-01-05 13:45:01")
testCharacterDate("2018/04/30 15:07:41")
testCharacterDate("2018/04/30 15:07")
# This date outputs an unknown format style because the
# American and British styles can become confused.
testCharacterDate("01-01-2010 12:00:00")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.