os.day

From ComputerCraft
Jump to navigation Jump to search

os.day
Function
Syntax
os.day()
Returns number day
API OS
Source CC:Tweaked

Returns the number of Days passed. It starts counting from 1.

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".

ExampleExamplePrint the date
Prints the number of the current day to the term.
Code
print(os.day())
Output
1