Lua: Implements %u in os.date()
This commit is contained in:
Zef Hemel
2025-10-10 09:11:14 +02:00
parent 5c4c71df8e
commit 3fa9c82add
+4
View File
@@ -137,6 +137,10 @@ export const osApi = new LuaTable({
// Day of the week
"%A": () => date.toLocaleString("en-US", { weekday: "long" }),
"%a": () => date.toLocaleString("en-US", { weekday: "short" }),
"%u": () => {
const dow = date.getDay();
return "" + (dow === 0 ? 7 : dow);
},
"%w": () => "" + date.getDay(),
// Day of the year
"%j": () => {