User Tools

Site Tools


user:acrowle1:portfolio:cprogproject4

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
user:acrowle1:portfolio:cprogproject4 [2014/03/23 16:37] – [References] acrowle1user:acrowle1:portfolio:cprogproject4 [2014/03/23 16:58] (current) – [Reflection] acrowle1
Line 158: Line 158:
   - the year is also evenly divisible by 400.   - the year is also evenly divisible by 400.
  
-The year 2000 is a significant calendar year because it was the first instance when the third criteria was invoked since switching from the Julian calendar to the Gregorian one. The reason for leap years? This was necessary to keep our calendar in alignment with Earth's revolutions around the sun. If we did not add a day to our calendar ~every 4 years, we would lose nearly 6 hours every year, so after 100 years our calendar would be off by nearly 24 days as measured by earth's revolutions.+The year 2000 is a significant calendar year because it was the first instance when the third criteria was invoked since switching from the Julian calendar to the Gregorian one. The reason for leap years? This was necessary to keep our calendar in alignment with Earth's revolutions around the sun. If we did not add a day to our calendar ~every 4 years, we would lose nearly 6 hours every year, so after 100 years our calendar would be off by nearly 24 days as measured by earth's revolutions. Why is a leap year skipped every 100 years, except in special instances (like year 2000)? This is to account for the 11 minutes shaved off from the 365.25 calendar year.  
 + 
 +While I wrote my code more simplistically saying if i divided by 4 equals zero, then it is a leap year and if i divided by 4 does not equal zero, not a leap year, the code worked. I could have added that i/100==0 || i/400==0 is a leap year to make my code more realistic to how the calendar interprets leap years from non-leap years, particularly in special instances such as 2000.
 =====References===== =====References=====
 In performing this project, the following resources were referenced: In performing this project, the following resources were referenced:
Line 164: Line 166:
   * http://www.timeanddate.com/date/leapyear.html   * http://www.timeanddate.com/date/leapyear.html
   * http://vpcalendar.net/when-is-the-next-leap-year.html   * http://vpcalendar.net/when-is-the-next-leap-year.html
-  * URL3 (provides useful information on topic+  * [[haas:spring2014:cprog:projects:dayofweek|Project: MENTAL MATH (DAY OF WEEK)]] 
-  * URL4+
  
-Generally, state where you got informative and useful information to help you accomplish this project when you originally worked on it (from Google, other wiki documents on the Lab46 wiki, etc.) 
user/acrowle1/portfolio/cprogproject4.1395592672.txt.gz · Last modified: 2014/03/23 16:37 by acrowle1