Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local year = 1970
- local month
- seconds = os.time()
- minutes = 0
- hours = -7
- days = 7
- years = 0
- while seconds >= 60 do
- seconds = seconds - 60
- minutes = minutes + 1
- end
- while minutes >= 60 do
- minutes = minutes - 60
- hours = hours + 1
- end
- while hours >= 24 do
- hours = hours - 24
- days = days + 1
- end
- while days >= 365 do
- days = days - 365
- years = years + 1
- end
- yearss = years
- while yearss >= 4 do
- yearss = yearss - 4
- days = days+1
- end
- local months = {
- 31, -- january
- 28, -- febuary
- 31, -- march
- 30, -- april
- 31, -- may
- 30, -- june
- 31, -- july
- 31, -- august
- 30, -- september
- 31, -- october
- 30, -- november
- 31 -- december
- }
- function returnmonth(x)
- if x == 1 then
- return "January"
- elseif x == 2 then
- return "Febuary"
- elseif x == 3 then
- return "March"
- elseif x == 4 then
- return "April"
- elseif x == 5 then
- return "May"
- elseif x == 6 then
- return "June"
- elseif x == 7 then
- return "July"
- elseif x == 8 then
- return "August"
- elseif x == 9 then
- return "September"
- elseif x == 10 then
- return "October"
- elseif x == 11 then
- return "November"
- else
- return "December"
- end
- end
- for i=1,#months do
- local sum = days-months[i]
- if sum >= 0 then
- days = sum
- else
- month = returnmonth(i)
- break
- end
- end
- --Line of strings
- if seconds < 10 then seconds = "0"..seconds end
- if minutes < 10 then minutes = "0"..minutes end
- if hours < 10 then hours = "0"..hours end
- print(month..", "..days..", "..year+years.."\n"..hours.." : "..minutes.." : "..seconds)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement