How to determine whether it is a leap year

Source: Internet
Author: User
  • The simplest judgment method is as follows:

The year on the last day of January 29, February is a leap year.

  • Complex precise calculation methods:
  1. A leap year is a normal year that can be divisible by four and cannot be divisible by 100. (For example, 2004 is a leap year, and 1901 is not a leap year)
  2. The year of the century can be divisible by 400 is a leap year. (For example, 2000 is a leap year, and 1900 is not a leap year)
  3. For a year with a large value, if the year can be divided into 3200 and 172800, It is a leap year. For example, 172800 years is a leap year, And 86400 years is not a leap year (because although it can be divided into 3200, it cannot be divided into 172800) (this is calculated based on the 365 days of a year, 5h48 '45. 5 ).

 

(Year % 4 = 0) and (Year % 100! = 0) or year % 400 = 0


The general rule for determining a leap year in the Gregorian calendar is as follows: four years, one hour, one hundred years without renewal, and one second in four hundred years.

How to determine whether it is a leap year

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.