you know how you get get seconds passed since 1 January 1970 using
print(os.time())
how do i get the number of days?
i know os.date("*t")["yday"] will print the day of the year, today, dec 16 being 350 but it just gives it for this year and there are also leap years so is there a way to just get days passed like you can get seconds passed. sorry if this is a dumb question
os.date("%j") -- Day of the Year (In Numbers)
--------------------------------------------------------------------------------
print(os.date("%j").."/365") -- As if Writing this: "350/365"
-- Lets put a starting number to keep track of the days the player has been on
local days_on = 0
-- Loops this script forever
while true do
-- lets increase the value of everyday the player has been on by 1
days_on = days_on + 1
-- now lets print the days the player has been on
print("You have been on for " .. days_on .. " days.")
-- Every 24 hours, log a day depending on whether the player joined (86400 seconds)
os.execute("sleep 86400")
end