Convert a Date vector into formatted labels by month, quarter,
half-year, year, or day.
Output formats:
"month":"2024.02"or"24.02""quarter":"2024.Q1"or"24.Q1""half":"2024.H1"or"24.H1""year":"2024"or"24""day":"2024.02.01"or"24.02.01"
Usage
.format_period(
x,
type = c("month", "quarter", "half", "year", "day"),
sep = ".",
abb = TRUE
)