Skip to content
Prev 48840 / 63424 Next

as.Date.character suggestion

On 21 Aug 2014, at 02:21 , Gabriel Becker <gmbecker at ucdavis.edu> wrote:

            
It's not a bug, it's just that you are at the mercy of strptime() if you do specify a format. If the format doesn't contain a conversion for some component, you get the value corresponding to the current date and leftover characters are just ignored, e.g.
[1] "2014-01-01"

and the extreme case is that a "" format gives current date, whatever the input. On Mac OSX Mavericks anyway --- this stuff is system-dependent.

So I think Peter Langfelder is absolutely right, remove the default, which is never used anyway, and possibly update the documentation with a more direct reference to strptime(). This should have near-zero effect on the semantics. 

Peter D.