what is the shortest way to calculate the difference in months (average num of days in a month as 30) between two unix timestamps? Date::diff is available for working with DateTime objects, but I’m wondering if there’s a neat way to work this out with timestamps…
Share
Well, 30 days are 60*60*24*30=2592000 seconds, so just divide the difference with that number: