% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fix_mdyyyy.R
\name{fix_mdyyyy}
\alias{fix_mdyyyy}
\title{Coerce Character m/d/yyyy to Date}
\usage{
fix_mdyyyy(x, ...)
}
\arguments{
\item{x}{A character date in the form of m/d/yyyy where m and d can be single 
integers like 1 for January.}

\item{\ldots}{ignored.}
}
\value{
Returns a data vector
}
\description{
Uses regular expressions to sub out a single day or month with a leading zero
and then coerces to a date object.
}
\examples{
fix_mdyyyy(c('4/23/2017', '12/1/2016', '3/3/2013', '12/12/2012', '2013-01-01'))
\dontrun{
library(dplyr)
data_frame(
    x = 1:4,
    y = LETTERS[1:4],
    start_date = c('4/23/2017', '12/1/2016', '3/3/2013', '12/12/2012'),
    end_date = c('5/23/2017', '12/9/2016', '3/3/2016', '2/01/2012')
) \%>\%
mutate_at(vars(ends_with('_date')), fix_mdyyyy)
}
}
