Import std.time.format
std.time.format
std.time's formats: ISO 8601, as each type's ToString and Parse write and read it; RFC 2822, as email has it, like "Fri, 23 Oct 2026 14:30:00 +0200"; and patterns, for Format and the Parse that takes one, whose letters stand for the parts of a date, time, or zone:
y the year: yyyy at least 4 digits, yy its last 2 (read as 2000 to 2099), y as is M the month: M 1 to 12, MM 01 to 12, MMM "Oct", MMMM "October" d, D the day of the month (d, dd) and of the year (D, DD, DDD) E the day of the week: E, EE, or EEE "Fri", EEEE "Friday" H, h the hour, 0 to 23 (H, HH), or 1 to 12 (h, hh), with a's "AM" or "PM" m, s the minute and second (m, mm, s, ss) S a fraction of the second, as many digits as there are S's, up to 9 X, x the offset: X "+02" (with minutes when it has any), XX "+0200", XXX "+02:00", each "Z" for UTC; x, xx, and xxx the same without "Z" Z the offset as "+0200" z the zone's abbreviation, like "CEST", which only Format writes VV the zone's name, like "Europe/Paris"
Text between single quotes is as it is, and '' is a quote. Other letters panic, as do a type's patterns with letters of parts it doesn't have; anything else is as it is. A number of one letter reads as many digits as it can have, and of two or more, that many, but DD reads two or three, as Format writes the days of the year past 99. Names are English and read in any letter case.
std/time/format.fb
Report an issue with this page or with FutureBlitz on GitHub.