Skip to content

fix osdate field types to match Lua manual#3416

Open
letuanhai wants to merge 1 commit into
LuaLS:masterfrom
letuanhai:master
Open

fix osdate field types to match Lua manual#3416
letuanhai wants to merge 1 commit into
LuaLS:masterfrom
letuanhai:master

Conversation

@letuanhai
Copy link
Copy Markdown

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.

`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.
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the type annotations for the osdate class in meta/template/os.lua by changing the fields year, month, day, hour, min, sec, wday, and yday from integer|string to integer, and making isdst optional (boolean?). There are no review comments, and I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant