From cd13b358cdd14a39ad148add10ba3787a4da355f Mon Sep 17 00:00:00 2001 From: Vitalie Spinu Date: Wed, 17 Dec 2014 23:06:21 -0800 Subject: [PATCH] Update documentation of `ymd` describing reliance on `strptime` Reported in #289 --- R/parse.r | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/R/parse.r b/R/parse.r index 0258d9d8..971df602 100644 --- a/R/parse.r +++ b/R/parse.r @@ -15,9 +15,12 @@ ##' truncated formats. For example \code{ymd} with \code{truncated = 2} will also ##' parse incomplete dates like \code{2012-06} and \code{2012}. ##' -##' NOTE: \code{ymd} family of functions are based on \code{\link{strptime}} -##' which currently correctly parses "\%y" format, but fails to parse "\%y-\%m" -##' formats. +##' NOTE: \code{ymd} family of functions are based on `parse_date_time` and thus +##' directly drop to internal C parser for numeric months, but use R's +##' `strptime` for alphabetic months. This implies that some of the `strptime`'s +##' limitations are inherited by lubridate's parser. For example truncated +##' formats (like %Y-%b) will not be parsed. Numeric truncated formats (like +##' %Y-%m) are handled correctly by lubridate's C parser. ##' ##' As of version 1.3.0, lubridate's parse functions no longer return a ##' message that displays which format they used to parse their input. You can