Skip to content

Date processing mismatch #291

Closed
Closed
@dajmcdon

Description

@dajmcdon
  1. The canned forecasters expect forecast_date and target_date to be Date objects.
  2. step_epi_ahead() and step_epi_lag() require lag/ahead to be integers.

This generally works OK unless you're doing annual forecasts (probably also monthly). Then these clash (because of leap years or strange numbers of days).

Suggested fix:

  1. lead / lag processing should handle things like "1 day" or "1 year". They should operate using date arithmetic on the level of the epi_df time_type. So if time type is year, ahead = 1 should automatically convert to "1 year".

This is possibly related to #290 .

Likely requires importing {lubridate} and then downstream licensing issues. See tidyverse/lubridate#968

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions