Re: [R] print format for difftime

From: Peter Dalgaard <p.dalgaard_at_biostat.ku.dk>
Date: Sat 21 May 2005 - 22:42:12 EST

Peter Dalgaard <p.dalgaard@biostat.ku.dk> writes:

> "BXC (Bendix Carstensen)" <bxc@steno.dk> writes:
>
> > Has anyone written a function that will print a difftime in the form:
> >
> > hh:mm:ss
> >
> > or
> >
> > yy-mm-dd hh:mm:ss
> >
> > depending on the actual size.
> > (sloppy notation for months/minutes, but surely you get the point).
>
>
> Ummm, how are you going to convert a number of days to
> years/months/days without specifying an origin? (00-01-00 could be
> 28,29,30, or 31 days.) Unless, of course you want to deal in "banker's
> months" of 30 + 5.25625/12 days.

Doh. Make that 5.2425 (97 leap days per 400 years). What was I thinking of there?

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Sat May 21 22:45:58 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:59 EST