Re: [R-SIG-Finance] getEndOfMonth and getEndOfBizWeek in RcppBDT broken?

2012-08-08 Thread Dirk Eddelbuettel
Sent: Wednesday, August 08, 2012 1:02 PM | To: David Reiner | Cc: r-sig-finance@r-project.org; d...@eddelbuettel.com | Subject: Re: [R-SIG-Finance] getEndOfMonth and getEndOfBizWeek in RcppBDT broken? | | | Ok, bug found. In the R file definining the convenience functions | | getEndOfBi

Re: [R-SIG-Finance] getEndOfMonth and getEndOfBizWeek in RcppBDT broken?

2012-08-08 Thread David Reiner
Thanks, Dirk. You're the best! -- David -Original Message- From: Dirk Eddelbuettel [mailto:e...@debian.org] Sent: Wednesday, August 08, 2012 1:02 PM To: David Reiner Cc: r-sig-finance@r-project.org; d...@eddelbuettel.com Subject: Re: [R-SIG-Finance] getEndOfMonth and getEndOfBizWe

Re: [R-SIG-Finance] getEndOfMonth and getEndOfBizWeek in RcppBDT broken?

2012-08-08 Thread Dirk Eddelbuettel
Ok, bug found. In the R file definining the convenience functions getEndOfBizWeek <- function(date = Sys.Date()) { stopifnot(inherits(date, "Date")) bdt$getEndOfBizWeek(date) } getEndOfMonth <- function(date = Sys.Date()) { stopifnot(inherits(date, "Date")) bdt$getEndOfMonth(dat

Re: [R-SIG-Finance] getEndOfMonth and getEndOfBizWeek in RcppBDT broken?

2012-08-08 Thread Dirk Eddelbuettel
On 8 August 2012 at 11:17, David Reiner wrote: | At least on my setup, they don't seem to work: | | > getEndOfBizWeek(date=as.Date('2012-09-05')) | [1] "2012-08-10" | > getEndOfMonth(date=as.Date('2012-09-05')) | [1] "2012-08-31" Dang. The functions hang off a package-global instance of the BDT

[R-SIG-Finance] getEndOfMonth and getEndOfBizWeek in RcppBDT broken?

2012-08-08 Thread David Reiner
At least on my setup, they don't seem to work: > getEndOfBizWeek(date=as.Date('2012-09-05')) [1] "2012-08-10" > getEndOfMonth(date=as.Date('2012-09-05')) [1] "2012-08-31" > sessionInfo() R version 2.15.1 Patched (2012-06-25 r59634) Platform: x86_64-pc-mingw32/x64 (64-bit) locale: [1] LC_COLLATE=