I struggled with wording the title, but basically I want a function where I can provide two dates and it would output something like: "2w" if the result was 15 days or "1y" if it was 13 months or "1m" if it was 4 or 5 weeks. Preferably down to the hour... but 1 day minimum.
I found a similar SO question but it's for PHP and isn't complete anyway: How to calculate the difference between two days as a formatted string?