简体   繁体   中英

PHP date format Today/Yesterday

I was wondering if I could get some insight on how to make the display format for a time stamp say things like "Today, 12:16PM" or "Yesterday, 9:34AM". At the moment it just displays as this "11-03-2010, 12:10PM".

How would I go about making it say "Today" or "Yesterday"

Thanks.

除了重复的答案外,此博客文章也可能适合您的需要: http : //blog.evandavey.com/2008/04/php-date-in-human-可读-form-facebook-style.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM