The PHP strtotime function resolves the date-time description of any English text to a UNIX timestamp [converts system time to UNIX timestamp]
First, get the Unix timestamp strtotime ("2009-1-22″" example) for the specified date as follows:
Echo
PHP uses Strtotime to get last month, next month, month's date, Strtotime last month
Write the program today, suddenly found a long time to write a long time to get the number of days of the function, the classic switch version, but to get the
PHP strtotime function usage, implementation principle and source code analysis, Strtotime function
SOURCE Location: \ext\date\php_date.cCopy the Code code as follows:/* {{{proto int strtotime (string time [, int now])Convert string representation
SOURCE Location: \ext\date\php_date.c
Copy Code code as follows:
/* {{{proto int strtotime (string time [, int now])
Convert string representation of date and time to a timestamp * *
Php_function (Strtotime)
{
Char *times, *initial_ts;
Detailed description of strtotime function usage in php and strtotime. The strtotime function usage in php is described in detail, and the strtotime function usage in php is described in this article. Share it with you for your reference. Details
Some uses of the strtotime function
The basic principle of strtotime function implementation
Strtotime ("-1 month") Reason for evaluation failure
Some uses of the Strtotime function
1, Strtotime ("JAN") and Strtotime ("January")
The effect of these
In front of the
In this article, we mention that the Strtotime function will have some status when using Strtotime ("-1 month") for one months today.
Therefore also leads to write this article, this article includes the following content:
Some
Some usages of strtotime functionThe realization principle of strtotime functionStrtotime ("-1 month") The reason for the evaluation failureSome usages of strtotime function1, Strtotime ("the") and Strtotime ("January")The effects of these two
SOURCE Location: extdatephp_date.c
The code is as follows
Copy Code
/* {{{proto int strtotime (string time [, int now])Convert string representation of date and time to a timestamp * *Php_function (Strtotime){Char *times,
+3 Day:
echo date (' y-m-d h:i:s ', Strtotime (' +3 Day '));
+3 days:
echo Date (' y-m-d h:i:s ', Strtotime (' +3 days '));
The results of the output are the same.
The following are similar usages
Strtotime (' +1 Day ');
Strtotime (' +3 Day
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.