Re: [Rd] trunc.Date and round.Date + documentation of DateTimeClasses

2021-09-30 Thread SOEIRO Thomas
voyé : jeudi 30 septembre 2021 15:27 À : SOEIRO Thomas Cc : r-devel@r-project.org; Dirk Eddelbuettel Objet : Re: [Rd] trunc.Date and round.Date + documentation of DateTimeClasses EMAIL EXTERNE - TRAITER AVEC PRÉCAUTION LIENS ET FICHIERS Excuse the exceptional top-reply: Note that a very related issue

Re: [Rd] trunc.Date and round.Date + documentation of DateTimeClasses

2021-09-30 Thread Martin Maechler
Excuse the exceptional top-reply: Note that a very related issue has been raised not so long ago by Dirk (in CC) on R's Bugzilla : trunc.Date should support months and years arguments as trunc.POSIXt does https://bugs.r-project.org/show_bug.cgi?id=18099 which had some agreement (also with y

Re: [Rd] trunc.Date and round.Date + documentation of DateTimeClasses

2021-09-30 Thread SOEIRO Thomas
About fractional days, trunc.Date2 actually seems to have no regression and to be backward compatible compared to the original trunc.Date: frac <- as.Date("2020-01-01") + 0.5 identical(trunc(frac), trunc.Date2(frac)) (I may still miss something since I do not understand how trunc.Date manage fr

[Rd] trunc.Date and round.Date + documentation of DateTimeClasses

2021-09-29 Thread SOEIRO Thomas
Dear All, 1) trunc.Date and round.Date: Currently, the help page for trunc.Date and round.Date says "The methods for class "Date" are of little use except to remove fractional days". However, e.g., trunc.POSIXt(Sys.Date(), "years") and round.POSIXt(Sys.Date(), "years") work because the functio