Expand description
strftime and the fixed text formats.
Specifiers (the set LeanCTX has always used):
| spec | meaning | example |
|---|---|---|
%Y %C %y | year, century, two-digit year | 2026 20 26 |
%m %b/%h %B | month, short name, long name | 11 Nov November |
%d %e %j | day, space-padded day, day of year | 07 7 311 |
%a %A %u %w | weekday short, long, Mon=1, Sun=0 | Tue Tuesday 2 2 |
%U %W %G %g %V | week numbers (Sun, Mon, ISO) | |
%H %k %I %l %p %P | hours, AM/PM | 09 9 09 9 AM am |
%M %S %s | minute, second, Unix seconds | |
%f %3f %6f %9f | fraction without a dot (9, 3, 6, 9 digits) | 250000000 |
%.f %.3f %.6f %.9f | fraction with a dot (0/3/6/9, or fixed) | .250 |
%z %:z %::z %:::z | offset | +0100 +01:00 +01:00:00 +01 |
%Z | UTC, or the offset +01:00 | |
%F %T %R %D %x %X %r %c %v %+ | composites | |
%% %n %t | %, newline, tab |
- (no padding), _ (spaces) and 0 (zeros) may follow % for the
numeric specifiers. An unknown specifier is written unchanged.
Structsยง
- Formatted
- A strftime result; render it with
Displayorto_string().