Skip to content

Instantly share code, notes, and snippets.

@Jordach
Created January 29, 2017 14:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jordach/c6da4911c5ce57a4bed1e848f1615a5c to your computer and use it in GitHub Desktop.
Save Jordach/c6da4911c5ce57a4bed1e848f1615a5c to your computer and use it in GitHub Desktop.
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