How does php determine time continuity?

Source: Internet
Author: User
How does php determine time continuity? $ Time = array ('2017-10-25 ', '2017-10-27', '2017-11-01 '); and so on, how can we determine whether the time is continuous ?, Strtotime ('2017-10-25 '); then judge ., How does mktime () strtotimed php determine time continuity?
$ Time = array ('2017-10-25 ', '2017-10-27', '2017-11-01 '); and so on, how can we determine whether the time is continuous?

------ Solution --------------------
Strtotime ('2017-10-25 '); then judge.
------ Solution --------------------
Mktime () strtotime date can be researched by yourself.
------ Solution --------------------
Whether the adjacent two are converted to timestamp minus is the timestamp of one day (if one day is continuous)
------ Solution --------------------
Is the entire array time continuous or partially continuous?
The entire array is continuous:
PHP code
  ------ Solution --------------------
I posted my method in another post just now.
It is calculated based on an incremental day of time:
PHP code
$a = array('2011-10-30','2011-10-31','2011-11-01');$flag = true;for($i=0;$i

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.