Skip to content

yearquarter regression for missing values #5422

@jangorecki

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)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions