Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 852889
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T07:40:19+00:00 2026-05-15T07:40:19+00:00

Possible Duplicate: how to find leap year? What will be the exact definition of

  • 0

Possible Duplicate:
how to find leap year?

What will be the exact definition of leap year? AFAIK “A year which is divisible by 4 is a leap year. But for century years’ the years which are divisible by 400 is a leap year.“

But that definition makes 100, 200, 300, 400…. upto 1700 NOT LEAP years! But in Gregorian calendar all of them are all leap year, check this out.

You can also try “call 1700” in Linux to verify.

So the correct algorithm for leap years would be:

if ( (year % 4 == 0) && ( year <= 1700 || year % 100 != 0 || year % 400 == 0 ))
    printf("%d is a leap year.\n", year);
 else
    printf("%d is not a leap year.\n", year);

But is this specific to Gregorian calendar? Even if that is the case why is it not mentioned here?

Regards,

PS:The history of Gregorian callender seems interesting check out the September month of 1752.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T07:40:19+00:00Added an answer on May 15, 2026 at 7:40 am

    I think it’s important to separate the idea of historical dates on the one hand and date calculation on the other. Historical dates are subject to all kinds of political, social, and technological issues, and are thus not very suitable for a simple algorithm. See this page for the wide disparity in the adoption of the modern Gregorian calendar.

    The usual practice when calculating dates is to forget about history and just pretend that the existing system has always been in place and will always be in place. (Unless you are an astronomer or certain other kinds of scientist, in which case you would use something even more accurate, and would be even less interested in historical dates.) If your application is all about recorded historical dates, then you are going to need a way to map those dates (which depend on the country, the period in history, etc.) to a more calculation-friendly universal dating system anyway.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Find url from string with php I found this code: but 2
Possible Duplicate: find which type of garbage collector is running Is there a way
Possible Duplicate: How do I find out which DOM element has the focus? Is
Possible Duplicate: SQL - find records from one table which don't exist in another
Possible Duplicate: Find out which class called a method in another class. Hello everyone,
Possible Duplicate: Find and Replace more than 1 word? I want to use jQuery
Possible Duplicate: Easiest way to find duplicate values in a JavaScript array Javascript array
Possible Duplicate: How to find out where a function is defined? get filename of
Possible Duplicate: On iPhone: Find out what song is currently playing? (in the iPod
Possible Duplicate: How to find a duplicate of length 5 in a single array.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.