SHARE
TWEET

Military Clock Converter thing 2

BobMe Aug 23rd, 2019 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- Military clock thing
  2.  
  3. seconds = 2000000000
  4. minutes = 0
  5. hours = 0
  6. days = 0
  7. years = 0
  8.  
  9.  
  10. while seconds >= 60 do
  11.     seconds = seconds - 60
  12.     minutes = minutes + 1
  13. end
  14.  
  15. while minutes >= 60 do
  16.     minutes = minutes - 60
  17.     hours = hours + 1
  18. end
  19.  
  20. while hours >= 24 do
  21.     hours = hours - 24
  22.     days = days + 1
  23. end
  24.  
  25. while days >= 365 do
  26.     days = days - 365
  27.     years = years + 1
  28. end
  29.  
  30. --Line of strings
  31.  
  32. if seconds < 10 then seconds = "0"..seconds end
  33. if minutes < 10 then minutes = "0"..minutes end
  34. if hours < 10 then hours = "0"..hours end
  35. if days < 10 then days = "0"..days end
  36. if years < 10 then years = "0"..years end
  37.  
  38. print("yy:dd:hh:mm:ss")
  39. print(years..":"..days..":"..hours..":"..minutes..":"..seconds)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top