0504 If statement (judgment date)

Source: Internet
Author: User

Case LIST:

First, judge the day of the month

Ideas: 1, first judge whether the year is correct (1<= year <=9999)

2. If the year is entered correctly, determine if the month is correct (1<= month <=9999)

3, if the month input is correct, then the judgment Day is correct

4, the day is divided into three kinds of situations

①1,3,5,7,8,10,12 these months are 31 days

②4,6,9,11 these months are 30 days

③ February There are two different cases, the leap year is 29 days, common year is 28 days

0504 If statement (judgment 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.