close Warning: Can't synchronize with repository "(default)" (/var/svn/tolp does not appear to be a Subversion repository.). Look in the Trac log for more information.

Opened 8 years ago

Closed 8 years ago

#1940 closed defect (fixed)

error Dseq

Reported by: Jorge Owned by: Pedro Gea
Priority: high Milestone: Mantainance
Component: R API Version: 3.4
Severity: major Keywords:
Cc:

Description (last modified by Jorge)

Dseq parece que se salta la fecha inicial:

> require(tolBasis)
Loading required package: tolBasis
Loading required package: lubridate

Attaching package: ‘lubridate’

The following object is masked from ‘package:base’:

    date

> currYear <- Dfloor(Sys.Date(), Yearly) # año en curso
> Dseq(currYear, dating=Monthly, len=12) # meses del año en curso
 [1] "2017-02-01" "2017-03-01" "2017-04-01" "2017-05-01" "2017-06-01"
 [6] "2017-07-01" "2017-08-01" "2017-09-01" "2017-10-01" "2017-11-01"
[11] "2017-12-01" "2018-01-01"}}}

La fecha inicial debería ser "2017-01-01"

Change History (5)

comment:1 Changed 8 years ago by Jorge

Description: modified (diff)

comment:2 Changed 8 years ago by Jorge

Estoy usando la versión 1.1 que descargo de la web. En el repositorio de CRAN la versión disponible es la 1.0 la cual tiene el mismo error.

comment:3 Changed 8 years ago by Pedro Gea

Status: newaccepted

Es un bug proveniente de un cambio de comportamiento en una función del paquete lubridate:

...
ceiling_date(x, unit = "seconds", change_on_boundary = NULL)
...
change_on_boundary
If NULL (the default) don't change instants on the boundary (ceiling_date(ymd_hms('2000-01-01 00:00:00')) is 2000-01-01 00:00:00), but round up Date objects to the next boundary (ceiling_date(ymd("2000-01-01"), "month") is "2000-02-01"). When TRUE, instants on the boundary are rounded up to the next boundary. When FALSE, date-time on the boundary are never rounded up (this was the default for lubridate prior to v1.6.0. See section Rounding Up Date Objects below for more details.
...

comment:4 Changed 8 years ago by Pedro Gea

(In [7385]) Refs #1940
Se utiliza el tercer argumento de ceiling_date si existe.

comment:5 Changed 8 years ago by Pedro Gea

Resolution: fixed
Status: acceptedclosed

(In [7386]) Closes #1940
Se actualiza la versión 1.1 del paquete

Note: See TracTickets for help on using tickets.