generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Does anyone have a shorter tick to date?

Previous Thread :: Next Thread 
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
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
TickerOfTime is not online. TickerOfTime
Joined: 02 Sep 2012
Total Posts: 2030
13 Sep 2015 08:50 PM
I could make one, but not rn
Report Abuse
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
13 Sep 2015 08:53 PM
:) when you have time
Report Abuse
TickerOfTime is not online. TickerOfTime
Joined: 02 Sep 2012
Total Posts: 2030
13 Sep 2015 08:55 PM
":) when you have os.time"
Ba-dum `tss
Report Abuse
MrJoeyJoeJoey is not online. MrJoeyJoeJoey
Joined: 20 Aug 2011
Total Posts: 20787
13 Sep 2015 08:56 PM
I thought os.time changed things into tick, not the other way around?
Report Abuse
TickerOfTime is not online. TickerOfTime
Joined: 02 Sep 2012
Total Posts: 2030
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image