⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 calendar.txt

📁 Vovida 社区开源的 SIP 协议源码
💻 TXT
字号:
			 ALL ABOUT CALENDARS     Although one can never be sure of what will happen at some futuretime, there is strong historical precedent for presuming that thepresent Gregorian calendar will still be in effect within the usefullifetime of the IMAP toolkit.  Since we also hope that c-client willstill be around by then, we have chosen to adhere to these precedents.      The purpose of a calendar is to reckon time in advance, to showhow many days have to elapse until a certain event takes place in thefuture, such as the harvest or the release of a new version of Pine.The earliest calendars, naturally, were crude and tended to be basedupon the seasons or the lunar cycle.      The calendar of the Assyrians, for example, was based upon thephases of the moon.  They knew that a lunation (the time from one fullmoon to the next) was 29 1/2 days long, so their lunar year had aduration of 354 days.  This fell short of the solar year by about 11days.  (The exact time for the solar year is approximately 365 days, 5hours, 48 minutes, and 46 seconds.)  After 3 years, such a lunarcalendar would be off by a whole month, so the Assyrians added anextra month from time to time to keep their calendar insynchronization with the seasons.      The best approximation that was possible in antiquity was a19-year period, with 7 of these 19 years having 13 months (leapmonths).  This scheme was adopted as the basis for the religiouscalendar used by the Hebrews.  (The Arabs also used this calendar untilMohammed forbade shifting from 12 months to 13 months.)      When Rome emerged as a world power, the difficulties of making acalendar were well known, but the Romans complicated their livesbecause of their superstition that even numbers were unlucky.  Hencetheir months were 29 or 31 days long, with the exception of February,which had 28 days.  Every second year, the Roman calendar included anextra month called Mercedonius of 22 or 23 days to keep up with thesolar year.     Even this algorithm was very poor, so that in 45 BC, Caesar,advised by the astronomer Sosigenes, ordered a sweeping reform.  Byimperial decree, one year was made 445 days long to bring the calendarback in step with the seasons.  The new calendar, similar to the onewe now use was called the Julian calendar (named after Julius Caesar).Its months were 30 or 31 days in length and every fourth year wasmade a leap year (having 366 days).  Caesar also decreed that the yearwould start with the first of January, not the vernal equinox in lateMarch.      Caesar's year was 11 1/2 minutes short of the calculationsrecommended by Sosigenes and eventually the date of the vernal equinoxbegan to drift.  Roger Bacon became alarmed and sent a note to PopeClement IV, who apparently was not impressed.  Pope Sixtus IV laterbecame convinced that another reform was needed and called the Germanastronomer, Regiomontanus, to Rome to advise him.  Unfortunately,Regiomontanus died of the plague shortly thereafter and the plans diedas well.      In 1545, the Council of Trent authorized Pope Gregory XIII toreform the calendar once more.  Most of the mathematical work was doneby Father Christopher Clavius, S.J.  The immediate correction that wasadopted was that Thursday, October 4, 1582 was to be the last day ofthe Julian calendar.  The next day was Friday, with the date ofOctober 15.  For long range accuracy, a formula suggested by theVatican librarian Aloysius Giglio was adopted.  It said that everyfourth year is a leap year except for century years that are notdivisible by 400.  Thus 1700, 1800 and 1900 would not be leap years,but 2000 would be a leap year since 2000 is divisible by 400.  Thisrule eliminates 3 leap years every 4 centuries, making the calendarsufficiently correct for most ordinary purposes.  This calendar isknown as the Gregorian calendar and is the one that we now use today.     It is interesting to note that in 1582, all the Protestantprinces ignored the papal decree and so many countries continued touse the Julian calendar until either 1698 or 1752.  In Russia, itneeded the revolution to introduce the Gregorian calendar in 1918.      Despite the great accuracy of the Gregorian calendar, it stillfalls behind very slightly every few years.  The most serious problemis that the earth's rotation is slowing gradually.  If you are veryconcerned about this problem, we suggest that you tune in short waveradio station WWV or the Global Positioning System, which broadcastsofficial time signals for use in the United States.  About once every3 years, they declare a leap second at which time you should becareful to adjust your system clock.  If you have trouble picking uptheir signals, we suggest you purchase an atomic clock (not part ofthe IMAP toolkit).     Another problem is that the Gregorian calendar represents a yearof 365.2425 days, whereas the actual time taken for the earth torotate around the Sun is 365.2422 days.  Thus, the Gregorian calendaris actually 25.92 seconds slow each year, resulting in the calendarbeing one day behind every 3,333 1/3 years.     Consequently, the Gregorian calendar has been modified with afurther rule, which is that years evenly divisible by 4000 are notleap years.  Thus, the year 4000 will not be a leap year.  Or, atleast we assume that's what will happen assuming that the calendarremains unchanged for the next 2000 years.     The modified Gregorian calendar represents a year of 365.24225days.  Thus, the modified Gregorian calendar is actually 4.32 secondsslow each year, resulting in the calendar being one day slow every20,000 years.     There is code in c-client to support the modified Gregoriancalendar, although it is currently disabled.  Sometime in the next2000 years, someone will need to enable this code so that c-client isY4K compiliant.  Then, 18,000 years from now, someone will have totear into c-client's code to fix the Y20K bug.     The Eastern Orthodox church in 1923 established its own rules tocorrect the Julian calendar.  In their calendar, century years modulo900 must result in value of 200 or 600 to be considered a leap year.Both the Orthodox and Gregorian calendar agree that the years 2000 and2400 will be leap years, and the years 1900, 2100, 2200, 2300, 2500,2600, 2700 are not.  However, the year 2800 will be a leap year in theGregorian calendar but not in the Orthodox calendar; similarly, theyear 2900 will be a leap year in the Orthodox calendar but not in theGregorian calendar.  Both calendars will agree that 3000 and3100 are leap years, but will disagree again in 3200 and 3300.     There is code in c-client to support the Orthodox calendar.  Itcan be enabled by adding -DUSEORTHODOXCALENDAR=1 to the c-clientCFLAGS, e.g.	make xxx EXTRACFLAGS="-DUSEORTHODOXCALENDAR=1"     The Orthodox calendar represents a year of 365.24222222... days.Thus, the Orthodox calendar is actually 1.91 seconds slow each year,resulting in the calendar being one day slow every 45,000 years.  TheEastern Orthodox church has not yet made any statements on how theY45K bug will be fixed.     The effect of leap seconds also needs to be considered whenlooking at the Y20K and Y45K problems.  Leap seconds put the clockback in line with the Earth's rotation, whereas leap years put thecalendar back in line with the Earth's revolution.  Since leap secondsslow down the clock (and hence the calendar), they actually bring theday of reckoning for the Gregorian and Orthodox calendars sooner.ACKNOWLEDGEMENT:The original version is from an old Digital Equipment Corporation SPRanswer for VMS.  Modifications for c-client, and information about theupdated Gregorian and Orthodox calendars added by Mark Crispin.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -