Skip to main content

Module format

Module format 

Source
Expand description

strftime and the fixed text formats.

Specifiers (the set LeanCTX has always used):

specmeaningexample
%Y %C %yyear, century, two-digit year2026 20 26
%m %b/%h %Bmonth, short name, long name11 Nov November
%d %e %jday, space-padded day, day of year07 7 311
%a %A %u %wweekday short, long, Mon=1, Sun=0Tue Tuesday 2 2
%U %W %G %g %Vweek numbers (Sun, Mon, ISO)
%H %k %I %l %p %Phours, AM/PM09 9 09 9 AM am
%M %S %sminute, second, Unix seconds
%f %3f %6f %9ffraction without a dot (9, 3, 6, 9 digits)250000000
%.f %.3f %.6f %.9ffraction with a dot (0/3/6/9, or fixed).250
%z %:z %::z %:::zoffset+0100 +01:00 +01:00:00 +01
%ZUTC, 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 Display or to_string().