A literal suffix attaches meaning to a number by converting it into a stronger chrono type. Instead of writing hours{23}, write 23h; the suffix makes duration code easier to read. section 4.2.3
Chrono provides suffixes for several time units:
- 12h, 34min, and 1s represent hours, minutes, and seconds. section 4.2.3
- 1ms, 1us, and 1ns represent milliseconds, microseconds, and nanoseconds. section 4.2.3
- 2023y and 23d represent a calendar year and day; named months such as December avoid numeric month ambiguity. section 4.2.3
Readable date construction
A date can combine calendar literals with operator/: year_month_day{2022y, December, 31d} or 2022y / December / 31. These forms expose the intended year, month, and day more clearly than numeric construction. section 4.2.3
hours operator""h(long long _Val) {
return hours(_Val);
}
The h suffix is implemented through operator""h, which receives a number and returns a chrono hours value. A suitable chrono literal namespace must be visible. section 4.2.3

