mstdmstdd Posted December 14, 2017 Share Posted December 14, 2017 Hello,In my php7/vue.js2.5 application I use function from here https://gist.github.com/mattytemple/3804571to show time like '1 hour ago', 'yesterday', 'tomorrow', 'in 2 weeks'Bot looking at the comments, looks like it has some errors.Now I need similar functions both in php and javascript with similar output results.Please, share it is there are any...Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/305910-i-search-function-to-show-time-like-1-hour-ago/ Share on other sites More sharing options...
Zane Posted December 16, 2017 Share Posted December 16, 2017 PHP has functionality for this already, found here: http://php.net/manual/en/function.date-diff.php And this isn't the PHP forum, btw. -moving to php forum Quote Link to comment https://forums.phpfreaks.com/topic/305910-i-search-function-to-show-time-like-1-hour-ago/#findComment-1554700 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.