timefmt - luxembourg/muxcode-clm GitHub Wiki

TIMEFMT()

FUNCTION: timefmt(<format>[, <secs>])

If <secs> isn't given, the current time is used. Escape sequences in <format> are expanded out.

All escape sequences start with a $. Any unrecognized codes or other text will be returned unchanged.

$a - Abbreviated weekday name $P - am/pm $A - Full weekday name $r - Same as $I:$M:$S $p $b - Abbreviated month name $R - Same as $H:$M $B - Full month name $S - Seconds after the minute $c - Date and time $t - Tab $C - Century $u - Day of Week (Sunday=7) $d - Day of the month $U - Week of the year from 1st Sunday $F - ISO8601 YMD $V - ISO8601 Week Number. $g - Two-digit ISO8601 year $w - Day of the week (Sunday=0) $G - All-digit ISO8601 year $W - Week of the year from 1st Monday $H - Hour of the 24-hour day $x - Date $I - Hour of the 12-hour day $X - Time $j - Day of the year $y - Two-digit year $m - Month of the year $Y - All-digit year $M - Minutes after the hour $z - Time zone offset $n - Newline $$ - $ character $p - AM/PM

Example: > think timefmt($A, the $dth day of $B.) Monday, the 17th day of July.

Related Topics: convtime, convsecs, etimefmt