|
| 13 Sep 2015 08:03 PM |
This is my current one I got from a free model
function Date(secs) local Days = secs/86400 - 365*2 local TotalDays = math.floor(Days) local LeapCycles = math.floor(Days /1461) local ExtraYears = math.floor((Days % 1461)/365) local Year = LeapCycles * 4 + ExtraYears local ExtraDays = TotalDays - LeapCycles * 1461 - ExtraYears * 365 local Months = {31,((ExtraYears == 0 and 29) or 28),31,30,31,30,31,31,30,31,30,31} local month,day for i,v in pairs(Months)do if v < ExtraDays then ExtraDays = ExtraDays - v else day = ExtraDays .. "/" month = i break end end local Hour = math.floor((secs % 86400)/3600) local Minute = math.floor((secs % 3600)/60) local Second = math.floor(secs % 60) local TwelveH = Hour % 12 local Time = (TwelveH >= 10 and "" or "0") .. TwelveH .. ":" .. (Minute >= 10 and "" or "0").. Minute .. ":" .. (Second >= 10 and "" or "0") .. Second .. ((Hour >= 12 and " PM") or " AM") return month.."/"..day .. (Year + 1972).. ", " .. Time end |
|
|
| Report Abuse |
|
|
|
| 13 Sep 2015 08:50 PM |
| I could make one, but not rn |
|
|
| Report Abuse |
|
|
| |
|
|
| 13 Sep 2015 08:55 PM |
":) when you have os.time" Ba-dum `tss |
|
|
| Report Abuse |
|
|
|
| 13 Sep 2015 08:56 PM |
| I thought os.time changed things into tick, not the other way around? |
|
|
| Report Abuse |
|
|
|
| 13 Sep 2015 08:59 PM |
Well, yes and no. os.time returns seconds past epoch in UTC time. tick returns seconds past epoch in machine time, whether it is server or client |
|
|
| Report Abuse |
|
|