Advertisement
Guest User

test

a guest
Sep 29th, 2017
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.21 KB | None | 0 0
  1. dny = os.day()
  2. tydny = math.ceil(dny/7)
  3. mesice = math.ceil(tydny/4)
  4. rok = math.ceil(mesice/12)-1
  5.  
  6. mesic = mesice - (math.floor(mesice/12)*12)
  7. tyden = tydny - (math.floor(tydny/4)*4)
  8. den = dny - (math.floor(dny/7)*7)
  9. denvtydnu = dny - (math.floor(dny/28)*28)
  10. if denvtydnu == 0 then
  11. denvtydnu = 28
  12. end
  13.  
  14. if den == 1 then
  15. day = "pondeli"
  16. elseif den == 2 then
  17. day = "utery"
  18. elseif den == 3 then
  19. day = "streda"
  20. elseif den == 4 then
  21. day = "ctvrtek"
  22. elseif den == 5 then
  23. day = "patek"
  24. elseif den == 6 then
  25. day = "sobota"
  26. elseif den == 7 or 0 then
  27. day = "nedele"
  28. end
  29.  
  30. if mesic == 1 then
  31. month = "ledna"
  32. elseif mesic == 2 then
  33. month = "unora"
  34. elseif mesic == 3 then
  35. month = "brezna"
  36. elseif mesic == 4 then
  37. month = "dubna"
  38. elseif mesic == 5 then
  39. month = "kvetna"
  40. elseif mesic == 6 then
  41. month = "cervna"
  42. elseif mesic == 7 then
  43. month = "cervence"
  44. elseif mesic == 8 then
  45. month = "srpna"
  46. elseif mesic == 9 then
  47. month = "zari"
  48. elseif mesic == 10 then
  49. month = "rijna"
  50. elseif mesic == 11 then
  51. month = "listopadu"
  52. elseif mesic == 12 or 0 then
  53. month = "prosince"
  54. end
  55.  
  56. print(dny)
  57. print(den)
  58. print(day)
  59. print(month)
  60. print(roky)
  61. print("Dnes je " .. day .. ", " .. denvtydnu .. ". " .. month .. " " .. rok)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement