From sarah.goslee at gmail.com  Tue Jan 31 21:28:11 2012
From: sarah.goslee at gmail.com (Sarah Goslee)
Date: Tue, 31 Jan 2012 15:28:11 -0500
Subject: [Rd] seq.Date bug?
In-Reply-To: <4F284C66.2020409@gmail.com>
References: <20264.18292.474587.518409@max.nulle.part>
	<4F284C66.2020409@gmail.com>
Message-ID: <CAM_vju=AbKnsBsyMrTiWdYbcFNFnhHO0aGFMzH2YQ4bRv8y5Pw@mail.gmail.com>

As Duncan pointed out, this is documented in ?seq.POSIXt:

     Using ?"month"? first advances the month without changing the day:
     if this results in an invalid day of the month, it is counted
     forward into the next month: see the examples.

But ?seq.Date gives the impression that the construct Dirk and I tried
should work:

     ## find all 7th of the month between two dates, the last being a 7th.
     st <- as.Date("1998-12-17")
     en <- as.Date("2000-1-7")
     ll <- seq(en, st, by="-1 month")
     rev(ll[ll > st & ll < en])

is given as an example, and it is not pointed out that this won't work for
the 30th of the month. Normally one can extrapolate from patterns given
in the examples, and here that isn't true. So perhaps the help should
be modified slightly instead?

Sarah

-- 
Sarah Goslee
http://www.sarahgoslee.com



[Rd] seq.Date bug?
Sarah Goslee