os.day
Returns the number of Days passed. It starts counting from 1.
os.day Function | |
---|---|
Syntax os.day(
| |
Returns | number day |
API | OS |
Source | CC:Tweaked |
There are 3 possible arguments:
ingame: Returns the current day in world time
local: Returns the number of Days passed since 1.1.1970 in your current timezone
utc: Returns the number of Days passed since 1.1.1970 in utc
If no argument given, it will use "ingame".
|
|||
Prints the number of the current day to the term. | |||
Code | <nowiki>
print(os.day())
</nowiki>
|
||
Output | 1
|
Functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Lua |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
CC:Tweaked |
|
This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.