Files
LLeMbas-TTY/docs/config/lua/wezterm.time/parse.md
T
Wez Furlong 85fb78d788 lua: add wezterm.time and Time object
Includes a method for determining sunrise/sunset.
2022-07-17 11:38:02 -07:00

13 lines
423 B
Markdown

# `wezterm.time.parse(str, format)`
*Since: nightly builds only*
Parses a string that is formatted according to the supplied format string:
```
> wezterm.time.parse("1983 Apr 13 12:09:14.274 +0000", "%Y %b %d %H:%M:%S%.3f %z")
"Time(utc: 1983-04-13T12:09:14.274+00:00)"
```
The format string supports the [set of formatting placeholders described here](https://docs.rs/chrono/latest/chrono/format/strftime/index.html).