Commit 4979ac1
authored
* Aligned with Lua 5.4 `os.date` semantics: `!` prefix selects UTC,
absent format defaults to `%c`, `*t` returns a table with `isdst`
only for local time, invalid specifiers raise an error.
* All `strftime` specifiers documented in the Lua 5.4 reference manual
are supported, including ISO week-based year (`%G`/`%g`/`%V`) and
composite formats.
* Extensive test suite uses the Go reference timestamp
`2006-01-02 15:04:05 UTC` (epoch `1136214245`) where every field -
year, month, day, hour, minute, second — has a distinct value.
Tests cover UTC and local modes, AM/PM, Sunday edge cases for
`%u`/`%w`, ISO week-year boundaries, `%%` escaping, `*t` table fields,
and invalid specifier rejection.
Signed-off-by: Matouš Jan Fialka <mjf@mjf.cz>
1 parent 568a3b6 commit 4979ac1
2 files changed
+482
-156
lines changed
0 commit comments