Advertisement
Guest User

Untitled

a guest
Dec 18th, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.46 KB | None | 0 0
  1. local nowTable = os.date("*t") --// gets the time now
  2. local christmas = { --// creates table for christmas date
  3.     year = nowTable.year,
  4.     month = 12,
  5.     day = 25
  6. }
  7.  
  8. local nowStamp = os.time(nowTable) --// get time stamp for now
  9. local christmasStamp = os.time(christmas) --// get the time stamp for christmas
  10.  
  11. local timeDifference = (christmasStamp - nowStamp)
  12. local min = (timeDifference/60)
  13. local hour = (min/60)
  14. local day = (hour/24)
  15.  
  16.  
  17. print(day)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement