Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dny = os.day()
- tydny = math.ceil(dny/7)
- mesice = math.ceil(tydny/4)
- rok = math.ceil(mesice/12)-1
- mesic = mesice - (math.floor(mesice/12)*12)
- tyden = tydny - (math.floor(tydny/4)*4)
- den = dny - (math.floor(dny/7)*7)
- denvtydnu = dny - (math.floor(dny/28)*28)
- if denvtydnu == 0 then
- denvtydnu = 28
- end
- if den == 1 then
- day = "pondeli"
- elseif den == 2 then
- day = "utery"
- elseif den == 3 then
- day = "streda"
- elseif den == 4 then
- day = "ctvrtek"
- elseif den == 5 then
- day = "patek"
- elseif den == 6 then
- day = "sobota"
- elseif den == 7 or 0 then
- day = "nedele"
- end
- if mesic == 1 then
- month = "ledna"
- elseif mesic == 2 then
- month = "unora"
- elseif mesic == 3 then
- month = "brezna"
- elseif mesic == 4 then
- month = "dubna"
- elseif mesic == 5 then
- month = "kvetna"
- elseif mesic == 6 then
- month = "cervna"
- elseif mesic == 7 then
- month = "cervence"
- elseif mesic == 8 then
- month = "srpna"
- elseif mesic == 9 then
- month = "zari"
- elseif mesic == 10 then
- month = "rijna"
- elseif mesic == 11 then
- month = "listopadu"
- elseif mesic == 12 or 0 then
- month = "prosince"
- end
- print(dny)
- print(den)
- print(day)
- print(month)
- print(roky)
- print("Dnes je " .. day .. ", " .. denvtydnu .. ". " .. month .. " " .. rok)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement