Get the App
SLTechnology News&Howtos  ›  Development  › 

How php returns relative time

Shulou Source: shulou.com Published: 2022-06-03 19:41:41 11月12日 Update

Editor to share with you how php returns the relative time, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

The details are as follows:

Function plural ($num) {if ($num! = 1) return "s";} function getRelativeTime ($date) {$diff = time ()-strtotime ($date); if ($diff)

Tags: Articles time content not much most hours weeks more knowledge industry information information channels channels references learning help Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Docker Linux OPPO Reno Huawei