05.08.2019, 06:24
You can use this function:
First argument is date table (with day/month/year data), second argument is number of days to add. This will handle month/year rollover correctly.
Code:
function shiftdate(date, days)
date.hour = 12
return os.date('*t', os.time(date) + days * 86400)
end
First argument is date table (with day/month/year data), second argument is number of days to add. This will handle month/year rollover correctly.