[R] Subtracting number of days from a date

About this list Date view Thread view Subject view Author view Attachment view

From: Hoeven, Maarten van der (Maarten.van.der.Hoeven@knmi.nl)
Date: Thu 27 May 2004 - 01:25:43 EST


Message-id: <1F8990C21AC73945BE6AAC5AD6D4CAE9086CD3@BCSXAC.knmi.nl>

Hi group,

suppose I have a date, say May 15 2004, and I want to now what date it is 23 days before that date. The way to calculate the new date should (...) take account of leap years :)

In pseudocode:

olddate <- "May 15 2004"
newdate <- olddate-23

I looked around in POSIXct etc..., maybe I overlooked?

Thanks,
Maarten
--------------------------------------------------------------

Zie ook/see also: http://www.knmi.nl/maildisclaimer.html

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Mon 31 May 2004 - 23:05:12 EST