Hey everyone! So today I was working on a little christmas project and I wanted to add a christmas countdown, so I made it, and it works, which is good, but when I looked at the months, it said that there was two months and 24 days, but there is actually 58 days which is not two months, does anyone know how to fix this? here is my script…
local countdownText = script.Parent.CountDown
local day = os.time({year = 2020, month = 12, day = 24, hour = 24, min = 0, sec = 0})
while wait() do
local secondsBetween = os.difftime(day, os.time())
local dataTable = os.date("!*t", secondsBetween)
local textString = dataTable["month"].." "..dataTable["day"].." "..dataTable["hour"].." "..dataTable["min"].." "..dataTable["sec"]
countdownText.Text = textString
if secondsBetween <= 0 then break end
end