I am wondering how I would go about parsing the PHP datetime() function. As a default, I have my datetime() looking like this:
03/04/20 04:58:23
And my code for it looking like this:
$datetime = date("d/m/y h:i:s");
I haven't specified the timezone and other stuff yet, but I am wondering how I would parse date("d/m/y h:i:s"); to something more presentable or useful. For example, if Bob creates a topic on a forum, the date/time will say, "Just now." A few hours pass and the date/time will say, "6 hours ago." A week passes and the date/time will say, "A week ago." I am wondering how I would go about changing 03/04/20 04:58:23 to something similar to that. Will I have to check the date/time and change the text appropriately? Or is there already a parameter for date() or datetime()? Thanks! -Xp10d3 Note: I apologize if this is a bad question. I'm new to Stackoverflow and hope that you understand.