Skip to content

yearqtr() could optionally output 2025Q4 format #7694

@jan-swissre

Description

@jan-swissre
data.table::yearqtr("2025-12-31")
#[1] 2025.75
data.table::yearqtr(as.Date("2025-12-31"))
#[1] 2025.75

there could be new argument format = c("numeric", "character") and the latter one would produce

2025Q1
2025Q2
2025Q3
2025Q4

so commonly used format

current workaround is to have wrapper

paste(data.table::year("2025-12-31"), data.table::quarter("2025-12-31"), sep = "Q")

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions