This example describes how PHP obtains yesterday, today, and tomorrow's date. Share to everyone for your reference, as follows:
PHP returns yesterday's Date function get_last_date () {$tomorrow = Mktime (0,0,0,date ("M"), Date ("D") -1,date ("Y")
: This article describes how to obtain the date of today, yesterday, and tomorrow for PHP. For more information about PHP tutorials, see. Directly go to the code and explain
"; Echo" yesterday: ". date (" Y-m-d ", strtotime ("-1 day ")),""; Echo"
Use PHP to get the time today tomorrow time stamp yesterday
2013-06-20 11:12
echo "Today:". Date ("y-m-d"). "
";
echo "Yesterday:". Date ("Y-m-d", Strtotime ("-1 Day")), "
";
echo "Tomorrow:". Date ("Y-m-d", Strtotime ("+1 Day")). "
";
echo "One
Local Test Cases:
# there can be no spaces on either side of the equal sign, before the error has been out here
yesterday= ' date-d last-day +%y-%m-%d '
echo $yesterday
curday= ' Date +%y-%m-%d '
echo $curday
echo "Now time: ' Date ' +%y%m%d%T '"
Use php to get detailed information about the timestamp of today, tomorrow, and yesterday. Use php to get the time. today, tomorrow, yesterday, the timestamp 2013-06-1? Phpecho today :. date (Y-m-d ). br; echo yesterday :. date (Y-m-d, strtotime
PHP code to get yesterday with tomorrow's date, there is a need for friends, can refer to the next.Example code:
"; echo "Yesterday:". Date ("Y-m-d", Strtotime ("-1 Day")), ""; echo "Tomorrow:". Date ("Y-m-d", Strtotime ("+1 Day")). ""
PHP Get time today tomorrow time stamp yesterday
PHP Get time today tomorrow time stamp yesterday
2011-06-30 9:46
echo "Today:". Date ("y-m-d"). "";?????echo "Yesterday:". Date ("Y-m-d", Strtotime ("-1 Day")), "";?????echo "Tomorrow:". Date
This article provides a detailed analysis of how to use php to obtain the timestamp of today, tomorrow, and yesterday. For more information, see use php to obtain the timestamp of today, tomorrow, and yesterday.
Echo "today:". date ("Y-m-d ")."
";
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.