How can I get the current date using os.Date() and get the date 5 days later

So I am goofing around and I’m making a system that allows you to be able to do something once every 5 days, but I need to actually get the date of which you will be able to do said thing again(Which would be 5 days from the current date)

How can I do this?

2 Likes

The only method I’m familiar with for getting Future dates would be to use os.time()

Then add the # of seconds that should pass. In this case 5 days (432000 Seconds)

And reformat the time back into a date.

local futureDate = os.time() + 432000 

print(os.date("*t", futureDate))
4 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.