-
-
Save Jordach/1bf48e164340b294ca0b70fe3ce682ee 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 = minetest.get_day_count() | |
local totalmonths = 1 | |
local totalyears = years | |
repeat | |
totaldays = totaldays - 30 | |
totalmonths = totalmonths + 1 | |
if totalmonths == 13 then | |
totalyears = totalyears + 1 | |
totalmonths = 1 | |
end | |
until totaldays <= 29 | |
days = totaldays | |
months = totalmonths | |
years = totalyears |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment