Sunday, January 17, 2016

how create it

Julius Caesar also established January 1 as the first day  (maths blog)  of the consular year, although for a long time on March 25 continued to be considered the day of the new year. In fact, until well into the eighteenth century on 25 March was considered the first day of the legal year in England and the American colonies. After the assassination of Julius Caesar one year after the introduction of the Julian calendar, a misinterpretation of the rule of leap years did that for a time was considered one of every three leap years. Augusto corrected the error omitting the February 29 leap for three consecutive years and resetting it in year 8 d. C. The Roman Senate renamed the Sextilis per month to honor the Emperor Augustus.

Another aspect of this calendar was originally in February was 29 days and 30 normal leap years. But it is having been the month of the ancient calendar Sextilis Quintilis and renamed July and August, in honor of Julius Caesar and Augustus Caesar respectively, it was decided that the month of August was 31 days instead of the 30 originally had Sextilis. For this he took off one day to February. For the Senate was very important that Caesar Augustus was not considered inferior to Julius Caesar so "their month," must have the same number of days that "the month of Julius Caesar." Another curious fact is the nomenclature of the leap year. The leap year was introduced in the Julian calendar, which added a day every four years in February, sandwiching it between 23 and 24. The Romans called the February 23, "Martti sixth calends", ie, the sixth day before March, formerly known as the first month of the year. When copying Egyptian setting an extra day every four years, they had to repeat on the last day of the year, one more day. Recall that in February was the last month and so repeated his 23th, which was the last day. The "sixth calends", so that the years ("bis" in Latin) was repeated that day were called "sextilis bis", which finally gave the name of "leap".  (Math tricks)

The Julian calendar had accumulated a delay of 11 minutes and 14 seconds per year, leading to an error of one day every 128 years. At the Council of Nicea in 325 had set March 21 as the date for the beginning of spring, but in the thirteenth century and beginning of spring on March 11. This affected the celebration of Easter, which marks the beginning of the liturgical year, so that the Church was concerned to fill this gap. Pope Gregory XIII entrusted the reform of the Julian calendar to the Veronese physician Luigi Lilio Ghiraldi, which had the invaluable help of the astronomer and mathematician Christopher Clavius.



For spring start again on 21 March, it had to be terminated ten days of delay accumulated along the first millennium. The Gregorian calendar came into effect on Thursday, October 4, 1582, although it was decreed that the next day was Friday ... October 15! It is said that Santa Teresa spent ten days without being buried, but actually only spent about ten hours between his death and his burial because he died just the October 4, 1582. (maths blog)

The Gregorian calendar was adopted immediately in Spain, Italy and Portugal, and was incorporated very slowly in other nations. Thus, England and the American colonies were adapted to the new calendar until September 3, 1752, so it had to suppress eleven days instead of ten. (While the Book Day is celebrated on April 23 to commemorate the deaths of Shakespeare and Cervantes, the truth is that Shakespeare died ten days later than Cervantes.) Sweden adopted the Gregorian calendar shortly afterwards (1753). Japan did in 1873, and Egypt in 1875. China in 1912, Turkey in 1917, Greece in 1923 and Russia, after a first attempt in 1918, officially adopted the Gregorian calendar in 1940. The last country to adopt it was South Korea, it formalized in 1962.

The new calendar, changed the rule for leap years, eliminating three calendar days of every four years. The rule is: each year that is evenly divisible by 4 is a leap year, except for the years that are exactly divisible by 100 are leap years only if they are evenly divisible by 400. If we apply these rules to the days before the Gregorian reform, the year 0 (1 BC) is considered to be exactly divisible by 4, 100 and 400; therefore, it is a leap year.

The Gregorian calendar is thus based on a cycle of 400 years, comprising 146,097 days. (97 years 366 days 303 years 365 days) 146 097 As is divisible by 7, the civil Gregorian calendar repeats itself exactly after 400 years. 146097 division by 400 an average of 365.2425 days per calendar year is obtained, which is a good approximation to the length of the tropical year, only an error of one day about 2500 years accumulates. Within each year, dates are specified according to the count of days from the beginning of the month. The order of the months and the number of days per month were taken from the Julian calendar.(math puzzles)

Zeller algorithm

Let us now build a function that determines the day of the week for any date in the Gregorian calendar. Assign a number to each day, so we have:
Sunday = 0, Monday = 1, Tuesday = 2, Wednesday = 3 = 4 Thursday, Friday & Saturday = 5 = 6
Since the month varying between leap years is common and February, we will consider this as the last month of the year, like the Romans, so our "initial year" will begin in March.

Be a ( to between zero and six) on the day of the week of March 1, 0000, then on 1 March 0002 will be a  + 1, since they have spent 365 = 52 * 7 + 1 days, ie 52 weeks and one day. So on 1 March 0003 will be a  + 3, and March 1, 0004 will be a  + 4 + 1, because this is a leap year and has one more day. Therefore each passing year to increase to 1 and if the year is a leap year increased by 2. So, if you spend x years, we will add  x  and tell once again the leap years, which are [ x / 4] - [ x / 100] + [ x / 400] (where [...] denotes the integer part) and to module 7, ie taking the rest to divide by seven.

Considering the year 2014, the number of leap years in these 2014 years are [2014/4] - [2014/100] + [2014/400] = 503 -20 + 5 = 488 and therefore considering the March 1 2014 was Saturday (= 6), we have the equality:
6 = a + 2014 + 488 mod 7
6 = a + 2502 mod 7
a = -2496 mod7
a = 3 mod 7

On March 1 of the year was 0 Wednesday !!!

You can check it out on this page where you'll find several drives of different calendars. From Wednesday, we can determine the day of the first day of March in any year,  and,  by the formula:


March 1 of the year and = (3 + y + [y / 4] - [y / 100] + [y / 400]) mod 7

Consider now the month of March 0000, knowing that the 1st was on Wednesday (= 3), we can determine any day of the month simply by adding 2 to the month and make module 7, for example on March 10 0000 = (2 + 10) mod 7 = 5 = Friday Likewise we can calculate the day of the first day of April, no more than adding 2 + 32 and to module 7 and get that 1 April 0000 = 6 = Saturday and as of April 1 is Saturday (= 6), by the same reasoning as before, we get the day any day of April 5 to adding the month and 7. module by the coefficients of each month, is thus set j (m) , where:





j (March) = 2
j (April) = 5
j (May) = 0
j (June) = 3
j (July) = 5
j (August) = 1
j (September) = 4
j (October) = 6
j (November) = 2
j (December) = 4
j (January) = 0
j (February) = 3

And we got to the congruence of Zeller for which you can calculate any day of the week given the date d / m / and  (math puzzles)

day = ( d  + j ( m ) + g ( and )) mod 7

With g ( and ) = and  + [ and / 4] - [ and / 100] + [ and / 400] and considering January and February months of the year before and . For example, to calculate the next Day of the Three Kings 2015, consider d = 6, m = y = 2014 Jan but considering penultimate month of January as 2014, obtaining: day = 6 + 0 + 2502 mod 7 = 2 = Tuesday



The funny thing is that these coefficients, j ( m ) verify the formula j ( m ) = [31 * m / 12] mod 7 , although Zeller uses a factor of 26/10, equivalent to 30.6 days a month, maybe more simple to work. I would like to 367/12 = 28 + 31/12 = 30.583 days per month, could be considered logical. For students it is easy to implement the algorithm in Scratch, where we avoid the difficulty of a formal programming language.(Birthday party services)

No comments:

Post a Comment