Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gmtime documentation improvement #14

Open
alemax-xyz opened this issue Nov 5, 2019 · 1 comment
Open

gmtime documentation improvement #14

alemax-xyz opened this issue Nov 5, 2019 · 1 comment

Comments

@alemax-xyz
Copy link

Documentation states that gmtime is As in the C standard library, but it is actually different in at least one aspect: in c it is int tm_wday; /* day of the week, range 0 - sunday to 6 - saturday */, in luatz it is within 1 - sunday to 7 - saturday, it is clearly doing +1 in the code.

I think it is a good idea to mention the difference in the documentation, as fixing it will introduce a breaking change.

@daurnimator
Copy link
Owner

Ah good find. Would you like to send a PR to the docs?

I'd be happy using the verbage from the lua reference manual:

a table with the following fields: year, month (1–12), day (1–31), hour (0–23), min (0–59), sec (0–61), wday (weekday, 1–7, Sunday is 1), yday (day of the year, 1–366)

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

No branches or pull requests

2 participants