Does anyone know of a quick way to find yesterdays date (for example) without creating a huge lookup table? The following will return todays month, date etc etc, but I need to know the date details for a previous day:
[lua]local date = os.date( “*t” ) – returns table of date & time values
print( date.year, date.month ) – print year and month
print( date.hour, date.min ) – print hour and minutes[/lua]
I’m trying to avoid creating epic if statements checking for name of month, days in month, is it a leap year etc etc… [import]uid: 173326 topic_id: 33677 reply_id: 333677[/import]