R/FindFormat.R

Defines functions FindFormat

Documented in FindFormat

FindFormat <-
function(string,CurrentDate){
#' @export
#This function will find the formate of the date from user selection
Formats<-rbind('%Y-%m-%d','%m-%d-%Y','%d-%m-%Y','%Y/%m/%d','%m/%d/%Y','%d/%m/%Y',
'%Y-%b-%d','%b-%d-%Y','%d-%b-%Y')
pick<-which(CurrentDate==string)  #Check for proper format 
if (length(pick)>0){
return(Formats[pick, ])};
return(string);
}

Try the StatCharrms package in your browser

Any scripts or data that you put into this service are public.

StatCharrms documentation built on Nov. 14, 2020, 5:09 p.m.