Skip to content

yearquarter regression for missing values #5422

Description

@jangorecki

I think this might cause a regression when passed missing values.

library(data.table)

yday(NA)
#> [1] 194
wday(NA)
#> [1] 3
mday(NA)
#> [1] 12
week(NA)
#> [1] 28
month(NA)
#> [1] 7
quarter(NA)
#> [1] 3
year(NA)
#> [1] 5881580
yearmon(NA)
#> [1] 5881581
yearqtr(NA)
#> [1] 5881581

data.table:::convertDate(NA_integer_, "yday")
#> [1] 194
data.table:::convertDate(NA_integer_, "year")
#> [1] 5881580

Originally posted by @berg-michael in #5300 (comment)

Activity

  1. added this to the 1.14.3 milestone on Jul 22, 2022
  2. self-assigned this
    on Jul 23, 2022
  3. modified the milestones: 1.14.9, 1.15.0 on Oct 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions