检查时间戳是今天 [英] Check if timestamp is today
本文介绍了检查时间戳是今天的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个以下格式的时间戳(由于PHP的美丽,可以轻松更改)。
I've got a timestamp in the following format (Which can easily be changed thanks to the beauties of PHP!).
2011-02-12 14:44:00
2011-02-12 14:44:00
什么是最快/最简单的方法来检查今天是否采用这个时间戳? / p>
What is the quickest/simplest way to check if this timestamp was taken today?
推荐答案
我想:
date('Ymd') == date('Ymd', strtotime($timestamp))
这篇关于检查时间戳是今天的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文