Skip to main content

Module format_time

Module format_time 

Source
Expand description

Unix timestamp -> formatted string conversion.

unix_to_parts decomposes a Unix timestamp into (year, month, day, hour, minute, second) using the Gregorian calendar algorithm (proleptic calendar, UTC only, no DST).

apply_pattern performs simple string substitution on strftime-like tokens: %Y (4-digit year), %m (month), %d (day), %H (hour), %M (minute), %S (second).

Functionsยง

apply_pattern ๐Ÿ”’
date_str
format_time
time_str
unix_to_parts