Slightly confused... I've never done something like this.
COMMUNITY QUESTION
How do I get the current date?
1 answer
do you even fl3x dood
Months = {
31,
28,
31,
30,
31,
30,
31,
31,
30,
31,
30,
31
}
function Round(d)
return math.floor(d+0.5)
end
Da = Round(tick()/86400)
Year = 1970
function PassYear()
for i,v in ipairs(Months) do
if i == 2 and Year%4 == 0 then
Da = Da-1
end
for j = 1, v do
Da = Da-1
if Da == 0 then
Date = i.."/"..j.."/"..Year
return
end
end
end
Year = Year + 1
PassYear()
end
PassYear()
m = Instance.new("Message",workspace)
m.Text = "Today is "..Date
wait(5)
m:Destroy()
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
Wow okay... that's a lot of lines just to get a date... XD
just bcuz im happi;-)
kthx
You really should use indentation, it makes code much easier to read. That's a great script though.