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 example describes how PHP gets yesterday, today, and tomorrow's date. Share to everyone for your reference, specific as follows:
PHP returns yesterday's date
function Get_last_date () {
$tomorrow = mktime (0,0,0,date ("M"), Date ("D")
: 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 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 ??? Echo today:. date (Y-m-d). br ;?? [] Original article address: php obtains the date of today, yesterday, and tomorrow. Thank you for sharing it with the original author.
? Php ?? ? Echo "Today:". date ("Y-m-d"). "br ";?? [] Original
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 '"
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.