Skip to content

Commit 6ff21cf

Browse files
committed
fix osdate field types to match Lua manual
`osdate` (return type of `os.date()`) fields are all integers (not `integer|string`), except for `isdst` which is `boolean` and may be absent if the information is not available. The `integer|string` union belongs on `osdateparam` (used by `os.time()`), not the return type.
1 parent b5e57c3 commit 6ff21cf

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

meta/template/os.lua

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,23 @@ function os.clock() end
1111

1212
---@class osdate:osdateparam
1313
---#DES 'osdate.year'
14-
---@field year integer|string
14+
---@field year integer
1515
---#DES 'osdate.month'
16-
---@field month integer|string
16+
---@field month integer
1717
---#DES 'osdate.day'
18-
---@field day integer|string
18+
---@field day integer
1919
---#DES 'osdate.hour'
20-
---@field hour integer|string
20+
---@field hour integer
2121
---#DES 'osdate.min'
22-
---@field min integer|string
22+
---@field min integer
2323
---#DES 'osdate.sec'
24-
---@field sec integer|string
24+
---@field sec integer
2525
---#DES 'osdate.wday'
26-
---@field wday integer|string
26+
---@field wday integer
2727
---#DES 'osdate.yday'
28-
---@field yday integer|string
28+
---@field yday integer
2929
---#DES 'osdate.isdst'
30-
---@field isdst boolean
30+
---@field isdst boolean?
3131

3232
---#DES 'os.date'
3333
---@param format? string

0 commit comments

Comments
 (0)