CLDR D
Day of year.
2
at the reference instant, Mon, Jan 2 2006, 3:04:05 PM MST
The ordinal day within the year, 1–366 (Jan 2 = 2). strftime %j pads to three digits; CLDR D does not pad unless written DDD.
| Language | Token | Caveat |
|---|---|---|
| C / POSIX strftime | %j | Zero-padded to three digits [001,366]. |
| CLDR / ICU pattern | D | Minimum digits, so unpadded; DDD zero-pads to three. |
| Go time layout | 002 | Zero-padded to three digits; __2 gives the space-padded form. Added in Go 1.13. |
| Java DateTimeFormatter | D | Unpadded; DDD zero-pads to three digits. More than three letters is an error. |
| Moment.js format | DDD | Unpadded; DDDD zero-pads to three digits. |
| Python strftime | %j | Zero-padded to three digits (002). |
| Ruby strftime | %j | Zero-padded to three digits, range 1..366. |
| Rust chrono | %j | Zero-padded to three digits (001–366). |
Definition anchored to Unicode UTS #35 — Date Field Symbol Table.