PHP Get Date

Source: Internet
Author: User
<?php  echo "Today:". Date ("y-m-d"). " <br> ";       echo "Yesterday:" Date ("y-m-d", Strtotime ("1 day"), "<br>";       echo "Tomorrow:". Date ("Y-m-d", Strtotime ("+1 Day")). " <br> ";    echo "One week later:". Date ("Y-m-d", Strtotime ("+1 Week")). " <br> ";       echo "2 days a week four hours two seconds after:". Date ("Y-m-d g:h:s", Strtotime ("+1 Week 2 Day 4 hours 2 Seconds")). " <br> ";       echo "Next week Four:". Date ("Y-m-d", Strtotime ("next Thursday")). " <br> ";       echo "Previous Monday:". Date ("Y-m-d", Strtotime ("Last Monday")). " <br> ";       echo "One months ago:". Date ("Y-m-d", Strtotime ("Last month"). " <br> ";       echo "One months later:". Date ("Y-m-d", Strtotime ("+1 Month")). " <br> ";       echo "Ten years later:". Date ("Y-m-d", Strtotime ("+10 Year")). " <br> ";      ? >

PHP Get Date

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.