I am having trouble using lubridate to increment by 1 month from 2013-09-30 (last day of September) to 2013-10-31 (last day of October).
The example provided in the documentation works well:
# get a vector of months (last day of the month)
vct_dates <- ymd("2013-01-31") %m+% months(0:11)
The following gives 2013-10-31 as expected:
vct_dates[10]
And, the following gives 2013-09-30:
vct_dates[9]
But, when I try and increment 2013-09-30 by one month, I get the wrong answer:
# should be 2013-10-31 but is 2013-10-30
vct_dates[9] %m+% months(1)
Any ideas...?