## Time and the Hour Running Through Rough DaysThere is a relatively simple algorithm to calculate the lapsed time between any two dates expressed in terms of the standard European calendar and GMT...Bill Casselman
Nasty question. The most straightforward way to answer it is very simple if somewhat tedious - make up a table of the different time periods involved, reduced to a single unit of time in a single time zone. For the unit of time I'll choose the day, and for the time zone I'll choose Greenwich Mean Time, for many years a kind of universal time on earth. GMT is 5 hours ahead of Eastern Standard Time and 7 ahead of Pacific Daylight Time, so I was born at 7 AM (GMT) and it is now 9 PM (GMT). We now add together - the number of days remaining in 1941,
- the number of days elapsed from 0:00 January 1, 1942 to 24:00 December 31, 2007,
- the number of days so far elapsed in 2007.
The table runs
making a total of This is not only somewhat tedious, it is just complicated enough to be prone to error. For short periods it can be done on a spreadsheet, laid out more or less as the table indicates. There is one mildly interesting mathematical question that arises - is there a good spreadsheet formula for calculating the length of a year? In the Gregorian calendar, the number of days in most years is 365, but very fourth year is a leap year with 366 - Another mildly annoying feature of the Gregorian calendar is that the number of days in a month varies rather erratically, so calculating the time elapsed between one day of the year and another is a bit painful. These observations make it all the more remarkable that there is a relatively simple algorithm to calculate the lapsed time between any two dates expressed in terms of the standard European calendar and GMT. Suppose a date is given in year, month, day format, expressed numerically. Let these be ## The algorithmHow does one calculate the Julian Day Number? I give here a slight modification of the method presented in Wikipedia, which I shall then explain. It works only for dates subsequent to 4800 B. C., but this is hardly a serious restriction since after all no dates were recorded anywhere on the planet before then. In Western culture since the early middle ages, there have been two calendars widely used, the Julian and the Gregorian. The Julian calendar was in important aspects the one put into place by Julius Caesar. It assumed a year of length 365.25 days, which was a bit longer than the true one of approximately 365.2422 days. It was used more or less continuously for more than a millennium, but as time went on it was realized that the date on which certain events happened, such as the equinoxes, were not what they had been in Roman times. For this reason it was replaced by the Gregorian calendar, which was much more accurate. In much of Europe the new one was put into place at midnight on October 4, 1582, so that the following day was October 15! It took a long time before the rest of Europe accepted the new scheme. It wasn't until 1752 that England adopted the Gregorian calendar, which it called New Style as opposed to Old Style. September 2, 1752 (O.S.) was followed by September 14 (N.S.). Because the Middle Ages recorded dates in the Julian calendar, it is conventional to use the Julian calendar through October 4, 1582 and the Gregorian one after that, although in accounts of English history through the 18th century dates are often recorded in both forms, the Julian calendar in which English contemporaries recorded them as well as the Gregorian calendar in which the French (among others on the Continent) did so. Therefore, the algorithm has to deal with two separate cases, depending on whether the date is given according to the Julian or the Gregorian calendar. Suppose the date is given as
Here For a Gregorian date the Julian day is then
while for a Julian date it is
To see how it works, for my birthday we get
and similarly for today ## What the terms meanLet's look at each of the steps in the calculation.
If This part of the formula has historical roots. In effect, January and February become the last months (10 and 11) of the previous year, so we are introducing a new calendar, one in which the first day of the year is March 1 instead of January 1. This is a good idea mathematically, since in this new calendar February, the only month with a variable number of days, is last. Hence the number of days from the start of the year to a given date does not depend on the year, as it does in our own calendar. This is such a great idea that you might wonder why it hasn't been done before! Now our calendar is derived from the Roman one, later amended in a first version by Julius Caesar and then in a second by Augustus. In the original Roman calendar, the beginning of the year was indeed March 1. There are still traces of this in our current calendar, because the names of the months September, October, November, and December are cognate with the Latin numbers 7, 8, 9, 10. It was Julius Caesar who made January the first month. On the other hand, though, it was also he who decreed that the variable day occurs in February. One never knows, do one?
S = 365y + [y/4], otherwise (we are using Gregorian dates) set S = 365y + [y/4] - [y/100] + [y/400]. The ancient Roman calendar was chaotic. Julius Caesar, acting according to Pliny the Elder with the advice of the Alexandrian mathematician Sosigenes, reformed it in about 46 B.C. The main effect was to bring the length of the calendar year into better synchronization with the true length of a solar year. Since the number of days in a solar year is not an integer, in order to maintain this synchronization the length of a calendar year must vary from time to time. In the Julian calendar, three out of every four years had 365 days and the fourth year 366. The Julian calendar, in effect, assumes the true length of a solar year (say from vernal equinox to vernal equinox) to be 365.25 days. This is not correct, and overshoots the mark a bit, since the true solar year is very close to 365.2422 days. Even in Roman times the better estimate of 365.2467 days was known to experts, and I have not seen any explanation of why the Julian scheme was accepted when it was known not to be as accurate as it might have been. By the year 1500 or so, it was obvious to anybody who knew his history that the date of the vernal equinox, which is a natural event to use for recording annual periodicity, was about 10 days later than it had been in Roman times. After a great deal of discussion, Pope Gregory XIII, acting with the advice of several Jesuit mathematicians and astronomers, decreed that a change would be made official. In Catholic Europe, the next day after October 4, 1582 was October 15. In the rest of Europe this reform was apparently considered an attempt by the Roman Catholic Church to subvert the true order of things, and in effect to steal days away from people. There seems even to have been current a common opinion that they were days removed permanently from one's life span. The change was, however, adopted gradually by the rest of Europe over a period of several centuries---by England in the middle of the 18th century, by Russia only after the revolution of 1917. Pope Gregory's decree arranged that the dates of the equinoxes would agree with those of ancient times, but it also modified the Julian scheme of leap years in order to maintain synchronization. Every 100th year would The number
T = [153m+2/5] to S.
In other words, the number
D-0.5 to the sum so far.The Julian day starts at noon. This number is the number of days elapsed since the beginning of the current month.
32044 (Gregorian) or 32082 (Julian).These numbers differ by The point of these subtractions is to set the origin of the calendars. The date now settled on as the origin of the Julian Day numeration was chosen for historical and religious reasons by Joseph Scaliger in the 16th century to be January 1, 4713 B. C. This somewhat arbitrary choice was made by the Scaliger on the basis of some arithmetic combining three cycles each of several years in length---the ## Approximating sequences by formulaThe number of days
This is the solution in this particular case of a more general problem: F(n) on a range of integers, with integral values, can be given by a formula of the type F(n) = [an + b] where a and b are real numbers?In this particular case, the function we are calculating is given by the table we have seen above. I repeat the part of the table we need:
As the third row of this table shows, we can write
What the graph shows is that
So our graph must pass between lower and upper stairs. But a line will lie above the lower stairs precisely when it lies above the lower region pictured below, and similarly it will lie below the upper stairs when it lies below the upper region in the picture. These are known as the There is a simple procedure for finding convex hulls in two dimensions, but here it would be quite feasible to find a line with a ruler and pen.
## Describing all possible linesWe don't have to rely on the human eye to find possible values of
Each of the intervals gives rise to a condition on
Each of these describes a region in the two dimensional plane in which
The figure on the left shows where both these conditions are satisfied, and the one on the right shows where in addition
... and here we add the conditions
What we see is that the final region of all allowable
In other words, the region of allowable ## ConvexityLet me summarize. We are given an integer sequence 0 ≤ m ≤ naba_{m} = [am+b]aba_{m} ≤ am+b < a_{m}+10 ≤ m ≤ n(a,b)2n+2a_{m} ≤ am+bam+b < a_{m}+1m=0nIn two dimensions there is a simple solution. Adding one inequality after the other, one has to deal with this problem: P and an inequality _{i}ax+by+c ≤ 0, find the vertices of the subset of the polygon where the inequality is satisfied.
The solution is to traverse the vertices and record where the line is crossed. ## Augustun dazeThe original calendar proposed by Julius Caesar was considerably more rational than the one we now use. The month of August (which was called ## To find out more- http://wwp.greenwichmeantime.com/info/current-time.htm
- http://en.wikipedia.org/wiki/Julian_day
- Otto Neugebauer,
*History of Ancient Mathematical Astronomy*. Springer-Verlag, 1975. The beginning of Volume III discusses Julian Days in detail. - William Shakespeare,
*Macbeth* - V. Chvatal,
*Linear programming*, W. H. Freeman, 1983 - Fats Waller,
*One never knows*...
Bill Casselman Those who can access JSTOR can find some of the papers mentioned above there. For those with access, the American Mathematical Society's MathSciNet can be used to get additional bibliographic information and reviews of some these materials. Some of the items above can be accessed via the ACM Portal , which also provides bibliographic services. |
Welcome to the These web essays are designed for those who have already discovered the joys of mathematics as well as for those who may be uncomfortable with mathematics. Search Feature Column Feature Column at a glance |