Created
January 29, 2017 14:39
-
-
Save Jordach/c6da4911c5ce57a4bed1e848f1615a5c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local totaldays = 2982 --minetest.get_day_count() | |
local totalmonths = 1 | |
local totalyears = 1 | |
while totaldays >= 30 do | |
totaldays = totaldays - 30 | |
totalmonths = totalmonths + 1 | |
if totalmonths == 13 then | |
totalyears = totalyears + 1 | |
totalmonths = 1 | |
end | |
end | |
-- print (totaldays) | |
-- print (totalmonths) | |
-- print (totalyears) | |
day = totaldays | |
month = totalmonths | |
year = totalyears |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment