Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 205330

Why is the chron package treating 2 digit years oddly starting from 2030?

$
0
0

I recently noticed an odd behavior in R I can't explain. I had this in some old code:

The following should produce the list of months from 01/1980 -> 01/2029 and it works as expected:

length(chron::seq.dates("01/31/80", "01/03/29", by="months"))
[1] 588

This is where things become strange. The following is the same as above but should produce dates until the year 2030:

length(chron::seq.dates("01/31/80", "01/03/30", by="months"))
Error during wrapup: "from" must be a date before "to"

So what is happening here?


Viewing all articles
Browse latest Browse all 205330

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>