Doing a leap year project

R

rn216_ccc

Hi there all,
I found a web site,. http://www.onlineconversion.com/leapyear.htm,
where it can give a list of leap years by within the given range by
the user, or the user may enter a year and the program will make the
decision if it is a leap year or not. In addition, I kind of
understand that there are certain rules to calculating leap years. For
instance, if the year is divisable by 4 and if the year is not
divisable by 100 but is divisable by 400 then it is a leap year.
However, what I wanted to know is do we actually have to wait 8 years
when a calendar year falls on a centry year that is not divisable by
400? For example, when I enter a range in the above given website,
such as 1690 to the year 1710, I get the following list....

1692, 1696, 1704, 1708'

as you can see between 1696 and 1704 there is an eight year gap. Is
that so?
 
V

Victor Bazarov

[..] For example, when I enter a range in the above given website,
such as 1690 to the year 1710, I get the following list....

1692, 1696, 1704, 1708'

as you can see between 1696 and 1704 there is an eight year gap. Is
that so?

I am amazed by the amount of non-C++ questions here recently. What
is it that compels you to ask about leap years in comp.lang.c++?
AFAICT the year 1700 was supposed to be a leap year. If you didn't
get it on that website you're writing about, how can we help here,
in comp.lang.c++. Contact the administrator of that site and give
him/her your grief about the bug in their software.

V
 
K

Kai-Uwe Bux

Hi there all,
I found a web site,. http://www.onlineconversion.com/leapyear.htm,
where it can give a list of leap years by within the given range by
the user, or the user may enter a year and the program will make the
decision if it is a leap year or not. In addition, I kind of
understand that there are certain rules to calculating leap years. For
instance, if the year is divisable by 4 and if the year is not
divisable by 100 but is divisable by 400 then it is a leap year.
However, what I wanted to know is do we actually have to wait 8 years
when a calendar year falls on a centry year that is not divisable by
400? For example, when I enter a range in the above given website,
such as 1690 to the year 1710, I get the following list....

1692, 1696, 1704, 1708'

as you can see between 1696 and 1704 there is an eight year gap. Is
that so?

a) Yes. 1700 was not a leap year, and also 1500, 1800 and 1900 were not.
1600 and 2000 were leap years.

b) Your question is off-topic in this group. Even more: is appears to be
completely unrelated to C++.


Best

Kai-Uwe Bux
 
K

Kai-Uwe Bux

Kai-Uwe Bux said:
a) Yes. 1700 was not a leap year, and also 1500, 1800 and 1900 were not.
1600 and 2000 were leap years.

Correcting myself: 1500 was a leap year. The Gregorian Calendar patch was
applied by early adopters in 1582.
 
H

Howard

Victor Bazarov said:
[..] For example, when I enter a range in the above given website,
such as 1690 to the year 1710, I get the following list....

1692, 1696, 1704, 1708'

as you can see between 1696 and 1704 there is an eight year gap. Is
that so?

I am amazed by the amount of non-C++ questions here recently. What
is it that compels you to ask about leap years in comp.lang.c++?
AFAICT the year 1700 was supposed to be a leap year. If you didn't
get it on that website you're writing about, how can we help here,
in comp.lang.c++. Contact the administrator of that site and give
him/her your grief about the bug in their software.

The year 1700 was not a leap year. In general, leap years are every year
evenly divisible by 4. But, years evenly divisible by 100 are NOT leap
years, unless they are also evenly divisible by 400.

-Howard
 
V

Victor Bazarov

Howard said:
Victor Bazarov said:
[..] For example, when I enter a range in the above given website,
such as 1690 to the year 1710, I get the following list....

1692, 1696, 1704, 1708'

as you can see between 1696 and 1704 there is an eight year gap. Is
that so?

I am amazed by the amount of non-C++ questions here recently. What
is it that compels you to ask about leap years in comp.lang.c++?
AFAICT the year 1700 was supposed to be a leap year. If you didn't
get it on that website you're writing about, how can we help here,
in comp.lang.c++. Contact the administrator of that site and give
him/her your grief about the bug in their software.

The year 1700 was not a leap year. In general, leap years are every
year evenly divisible by 4. But, years evenly divisible by 100 are
NOT leap years, unless they are also evenly divisible by 400.

That's by current definition. I didn't live in the year 1700 to know
whether it actually was or wasn't leap. Did you? What sources do you
use to know it "was not" a leap year? Apparently there are web sites
that answer "was 1700 year a leap year?" differently.

V
 
K

Kai-Uwe Bux

Victor said:
Howard said:
Victor Bazarov said:
(e-mail address removed) wrote:
[..] For example, when I enter a range in the above given website,
such as 1690 to the year 1710, I get the following list....

1692, 1696, 1704, 1708'

as you can see between 1696 and 1704 there is an eight year gap. Is
that so?

I am amazed by the amount of non-C++ questions here recently. What
is it that compels you to ask about leap years in comp.lang.c++?
AFAICT the year 1700 was supposed to be a leap year. If you didn't
get it on that website you're writing about, how can we help here,
in comp.lang.c++. Contact the administrator of that site and give
him/her your grief about the bug in their software.

The year 1700 was not a leap year. In general, leap years are every
year evenly divisible by 4. But, years evenly divisible by 100 are
NOT leap years, unless they are also evenly divisible by 400.

That's by current definition. I didn't live in the year 1700 to know
whether it actually was or wasn't leap. Did you? What sources do you
use to know it "was not" a leap year? Apparently there are web sites
that answer "was 1700 year a leap year?" differently.

Living in 1700, whether you would had considered it a leap year did depend
on _where_ you lived. Adoption of the Gregorian Calendar started 1582 with
a bunch of catholic countries. However, many countries still used the
Julian Calendar in 1700. E.g., the Protestand German states adopted the
Gregorian Calendar in 1699, just in time to get 1700 "right", however,
England waited until 1752 and Greece until 1923.

As for a source: I use the Encyclopedia Britannica.


Best

Kai-Uwe Bux
 
J

James Kanze

[..] For example, when I enter a range in the above given website,
such as 1690 to the year 1710, I get the following list....
1692, 1696, 1704, 1708'
as you can see between 1696 and 1704 there is an eight year gap. Is
that so?
I am amazed by the amount of non-C++ questions here recently. What
is it that compels you to ask about leap years in comp.lang.c++?
AFAICT the year 1700 was supposed to be a leap year. If you didn't
get it on that website you're writing about, how can we help here,
in comp.lang.c++. Contact the administrator of that site and give
him/her your grief about the bug in their software.
The year 1700 was not a leap year. In general, leap years are every year
evenly divisible by 4. But, years evenly divisible by 100 are NOT leap
years, unless they are also evenly divisible by 400.

It depends on where you are. It was a leap year in the Julian
calendar, but not in the Gregorian; in 1700, places like France
used the Gregorian calendar (so it wasn't a leap year), but the
Anglo-Saxon world didn't make the switch until 1752, so 1700
would have been a leap year.

If you're on a Unix machine, you might want to try the command
"cal 9 1752". (The Unix cal program has never been
internationalized, and so always prints the calendar for the
United States, regardless of where one actually is.)

See for example
http://scienceworld.wolfram.com/astronomy/GregorianCalendar.html
or http://webexhibits.org/calendars/year-definitions.html.
 
H

Howard

Kai-Uwe Bux said:
Victor Bazarov wrote:


Living in 1700, whether you would had considered it a leap year did depend
on _where_ you lived. Adoption of the Gregorian Calendar started 1582 with
a bunch of catholic countries. However, many countries still used the
Julian Calendar in 1700. E.g., the Protestand German states adopted the
Gregorian Calendar in 1699, just in time to get 1700 "right", however,
England waited until 1752 and Greece until 1923.

As for a source: I use the Encyclopedia Britannica.

1700 was a looong time ago, so I'm not sure exactly where I was living then.
Perhaps my servant Renfield recalls...

-H
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top