Can’t take credit for all of this, but I also don’t remember where the code that I started with came from.
days_ago is a function that will take two dates and return a more human friendly version of dates. So if you pass today’s date and yesterday’s date it will return “1 day ago.”