JavaScript Date (date) object

Source: Internet
Author: User

A Date object can also be used to compare two dates.

The following code compares the current date with January 14, 2100:

<DivID= "NAV">    <ul>        <Li><ahref= "#1"Target= "_self">What is International class?</a></Li>        <Li><ahref= "#2"Target= "_blank">International class Courses</a></Li>        <Li><ahref= "#3"Target= "_blank">Who is suitable for the international class?</a></Li>        <Li><ahref= "#4"Target= "_blank">The way to go to high school abroad</a></Li>        <Li><ahref= "#5"Target= "_blank">Guangzhou High School International Class inventory</a></Li>    </ul></Div>
var x=New  Date (); X.setfullyear (2100,0,14); var New Date (); if (x>today)  {  alert ("Today is before 14th January 2100");  } Else   {  alert ("Today is after 14th January 2100");  }

Just

JavaScript Date (date) object

Related Article

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.