Time.Format

Core

Strftime-style formatting for Time.Posix.

Prefer Time.format, which is this same function.

Values

format

format : String -> Zone -> Posix -> String

Format posix in zone using a strftime-style template.

Supported tokens: %%, %Y, %y, %m, %d, %H, %M, %S, %I, %p, %a, %A, %b, %B, %w, %f, %z. Unknown %X sequences are kept as literals. English names only for weekday and month tokens.

Examples

format "%Y-%m-%d" Utc (Time.millisToPosix 0) == "1970-01-01"