Commit Graph
4 Commits
Author SHA1 Message Date
Matouš Jan FialkaandGitHub 3ddfab51e8 [Space Lua] Extend os (#1836) 2026-02-13 20:05:08 +01:00
Zef Hemel 8592b3add6 Lua snake_case -> camelCase naming in tests 2026-02-12 17:32:28 +01:00
Matouš Jan FialkaandGitHub 4979ac1907 [Space Lua] Rewrite os.date to support UTC mode and strftime specifiers (#1835)
* 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>
2026-02-12 17:24:03 +01:00
Zef Hemel f4336bf09f Code restructuring: eliminated the top-level lib/ directory 2025-09-23 17:00:34 +02:00