Data arithmetic / elapsed days calculation program



#84

Does anyone have a basic program for calculating elapsed days between two given dates? I would like to run this program on a 15C, 33S or any Pioneer series model, and a 48-series.


#85

That seems like a "data-intensive" program. Can you make a good alogrythm? Try july31 1947 to april 6, 2004. I guess I would write a supbroutine that 1st figures out the "day number". So you do 31 <enter> 4 <enter> 1947 GSB(x) and calculates days through march---how to store that----a series of if/then could build essentially a "lookup table" so that with "4" it returns 90 days--what about the leap years--a nested if/then for that?

Then you add the days to the month "lookup table reuslt" and that is stored in a register, as is the start year.

Then you run the same thing for the second date. Then the years subtract--oh, we need a leap year figurer for that part, too.

I think this is too much memory for hte 15c, but it would fit in the 33s and the 48g.

I am sure there is a program for (on the 48 and 49) this available at hpcalc.org.

Regards


#86

Hi, Bill:

Bill wrote:

   "I think this is too much memory for hte 15c, but it would fit in the 33s and the 48g."

You're joking, right ? The HP-15C can do this sort of calculation using 1/10th of its programming resources, at most.

As for the 33s and its 32 Kb of RAM, try and invert an 8x8 matrix using it. The 0.4 Kb HP-15C can do that directly from the keyboard.

Best regards from V.


#87

Hi Valentin,

Glad I got your attention; I have not conversed with you in some time :-)

Well, seeing that some here are more clever than me, yes indeed it looks like you can easily fit the problem into a 15c.

I am afraid that my stream-of-consciousness idea of a solution would never fit into the 15c.

Yet another example of how much more effective brains (15c, excellent built-in resources, efficient memory allocation) wins over brawn (33s, gobs of memory, difficulty using most of it) any day.

On this day, I fit into the brawn category :-(

Regards,

Bill


#88

Hi Bill, folks,

Valentin is right: a DAYS BETWEEN DATES program does fit in the 15C memory. It even fits in the 11C memory. The following program has 140 lines and includes DAY OF WEEK as well (Of course Valentin would need only half of these, or even less if he manages to concoct a more amazing formula :-) . This is a direct implementation of the formulas used by the Master Library Module of the TI-59 calculator, one of my earliest 15C program, so do not expect anything close to perfection, quite the contrary! (Apparently, at the time I did not know what LSTx was for. I would also sometimes use 2 10^x instead of 100 just to save a step, even though this just makes the program slower, sometimes in the same program I would use simply 100).

f LBL 0 x<>y STO 0 x<>y ENTER g INT STO 1 Rv RCL 1 - 2 10^x * ENTER
g INT STO 2 Rv f FRAC 4 10^x * STO 3 2 ENTER RCL 2 g TEST 7
GTO 1 RCL 3 ENTER 1 - 100 / 1 + g INT .75 * g INT CHS ENTER RCL 3
ENTER 1 - 4 / g INT + RCL 2 ENTER 1 - 31 * + RCL 1 + RCL 3
ENTER 365 * +
g RTN
f LBL 1 RCL 3 ENTER 365 * RCL 1 + RCL 2 ENTER 1 - 31 * + RCL 2
ENTER .4 * 2.3 + g INT - RCL 3 ENTER 4 / g INT + RCL 3
ENTER 100 / 1 + .75 * g INT -
g RTN
f LBL A GSB 0 RCL 0 GSB 0 RCL 0 - CHS
g RTN
f LBL B GSB 0 ENTER CHS ENTER 7 / g INT 7 * +
g RTN

f A works just like the DeltaDYS on the 12C, when D.MY format is set.

Unlike the DATE function on the 12C, f B requires only one argument (the date) and returns 0=Sat, 1=Sun, ... 6=Fri. This is quite handy in Portuguese as the days of the week are the corresponding ordinal numbers from Monday (segunda = 2nd) to Friday (sexta = 6th) :-)

Example:

01.012005 ENTER
31.122005 f A
=> 364

29.092005 f B
=> 5 'Today is quinta-feira, oops, Thursday!'

Regards,

Gerson.

-----------------------------
Notes:

1) The listing is supposed to be ok as I have just keyed it in the 11C and it worked. The program seems to be ok too. Of course g TEST 7 should be replaced by f x>y on the 11C. For speed, occurrences of 2 10^x and 4 10^x should be replaced by 100 and 10000 (or 100 g x^2), respectively.

2) The Brazilian edition of the TI-59/59 Master Library Module Manual has some typos (missing parentheses and brackets). I think the pencil annotation I made is correct:

if m < 3 then
f:=365a + d + 31(m-1) + int ((a-1)/4)-int(3/4(int((a-1)/100)+1))
else
f:=365a + d + 31(m-1) + int(a/4) - int(3/4(int(a/100) + 1)) - int(0.4m + 2.3)

day of week = f + (int(-f/7)*7)

a=year; m=month; d=day

A funny mistranslation in this manual:

The HI-LO GAME (ML-21) was translated as JOGO: Alô? Veja! (GAME: Hello? Look!) which made no sense at all! Apparently, the translator thought LO was short for 'LOOK' and HI was just the interjection 'hi'.

(Edited to correct a couple of typos - I never get rid of them!)

(Edited again to include a missing g INT in third line)

----------

To the list of beginner's mistakes in this program, I have to mention at least ten unnecessary ENTERs :-)
There's going to be a cleaner version below in the thread.

Edited: 1 Oct 2005, 1:19 a.m.

#89

Hi all, Hi Bill.

Good question, Stephen. I'm into astronomy, so also into this stuff... (JD etc...)

One thing about the forum, you sure get some REALLY GOOD ANSWERS!

Even if you were on a desert island and had no calculator, it's easy
to work out how many days old you are (that is also sobering...we are a bit ephemeral, imho).

You just work out what the leap years are (easy since if they divide into four they are, except for years divisible by 400).

Make a small list of them (a single small look up table).
You just then some simple work (30days hath september...) to get from start day/month to end day month (ignoring years).
Add to this the 365 x number of years between the dates (if more than 1) and finally, count how many leap years are in between, adding one day for each leap year. There's your answer. Nearly do it in your head...

DW

#90

For the 48 (and 49) series, you can use the DDAYS command, as long as the dates are from October 15th, 1582 through December 31st, 9999.

With system flag -42 clear, the arguments should be formatted as MM.DDYYYY, and with flag -42 set, the format is DD.MMYYYY.

Regards,
James


#91

Hi;

the day-of-week (DOW in the HP41CX or HP41 Time Module) in the HP48G may be obtained with TSTR (Time STRing). A brief description of TSTR can also be found here: HP48GII Users´s Guide (chapter 25).

TSTR uses the contents in both Level 2 (time stamp) and Level 1 (date reference) to compose a string (ALGEBRAIC mode demands arguments in the same order),. Given that both contents are valid, the resulting string (Level 1) is added a three-character reference head for the day-of-week (MON, TUE, WED...).

Cheers.

Luiz (Brazil)


Edited: 30 Sept 2005, 5:14 p.m.


#92

Quote:
Given that both contents are valid, the resulting string (Level 1) is added a three-character reference head for the day-of-week (MON, TUE, WED...).

Hi Luiz,

TSTR is very handy, but the output is in English. What about days of the week in languages other than English, like good ol' Portuguese, for instance?

<< "SábDomSegTerQuaQuiSex" 1.012 ROT DDAYS 7 MOD 3 * 1 + DUP 2 + SUB >>

Flag -42 setting is irrelevant! Just enter the date according to the date format on your calculator:

30.092005 => "Sex" (sexta-feira)

Replace "SabDomSegTerQuaQuiSex" with your favorite string:

"SamDimLunMarMerJeuVen"
"SabDomLunMarMerGioVen"
"SábDomLunMarMiéJueVie"
"SâmDumLunMarMieJoiVin"
"SatSunMonTueWedThuFri"
"SamSonMonDieMitDonFre"
"ZatZonMaaDinWoeDonVri"
"LörSönManTisOnsTorFre"
"LauSunMaaTiiKesTorPer"
"SobNiePonWtoSroCzwPia"

etc...

Cheers,

Gerson.

#93

I don't have a calculator program, but it is fairly easy:

1) Move new year to the first of march, so that march is month 0 and february is month 11 of the previous year.

2) Compute the days since some day in january 1 BC as

dn = year DIV 400 - year DIV 100 + year * 1461 DIV 4 + month * 153 DIV 5 + dayofmonth

DIV is integer division, a very useful operation on the HP 33S (but easy to substitute with divide and INTG).

3) Do this for both dates and subtract the results.

If you want the day of week, this can be reduced to

dow = (year DIV 400 - year DIV 100 + year * 5 DIV 4 + month * 13 DIV 5 + dayofmonth) MOD 7

This is called Zeller's congruence.

You can ignore the year DIV 400 - year DIV 100 part if you are only interested in the 20th and 21st centuries.


#94

Convert each to Julian Day Numbers and subtract.

http://scienceworld.wolfram.com/astronomy/JulianDate.html

Or if you can limit your range, use the Modified Julian Day Numbers (note that these change at midnight, not noon!)

http://scienceworld.wolfram.com/astronomy/ModifiedJulianDate.html


#95

Thanks (everyone) for a terrific response. I knew it had something to do with Julian date, but I was wondering if there were other ways since some of these calcs keep time / date.


#96

Quote:
(...), but I was wondering if there were other ways since some of these calcs keep time / date.

You do know that the HP-12C even has a button to calculate days between dates, don't you?


#97

Yeah, I have the 12C and love this feature about it. I have several other HPs that calculate elapsed days. For the ones that don't calculate this, I want to write a short program to calculate it. Reason: I'm a medical physicist and frequently I need to calculate elapsed days for a cancer patient's treatment (from start to finish). This is most helpful for the physicians, really, but I have to "QA" every patient's chart weekly. For years I either do it in my head or manually (but using a calc). Now I'm learning to think smarter (or just being lazy!). I think I will first try the Modified Julian Date method since it seems easier. I have over a dozen new HPs added to my collection and trying to rotate them in/out of use (at home and at work) and need them to do what I want them to do. (My first HP was a 28S in '89 and cut my teeth on it.)


#98

Meanwhile, you can use the 15C program above. It is no masterpiece but it works!

In testing it, I can see that today I am exactly 16141 days old, a prime number. And that I got married on a Wednesday (11/11/1987, all prime numbers too... but that was not on purpose), which matches what I can remember.

To use the MM.DDYYYY format you're used to, just replace the first two lines with these:

f LBL 0 x<>y STO 0 x<>y ENTER g INT STO 2 Rv RCL 2 - 100 * ENTER
g INT STO 1 Rv f FRAC 4 10^x * STO 3 2 ENTER RCL 2 g TEST 7

Best regards,

Gerson.

#99

A simple program appears in the HP25 Applications Handbook; a more sophisticated version is published in the HP41 Applications Pac.

The HP25 version is quite simple, due to the limitations of that model (one of my favorites, indeed!). If you would like to understand how it works, and then adapt it to other machines, it may be a very appropriate starting point.


I wrote a version of this prg for the 42S and I like very much how it works. Feel free for asking if interested.

Raul


Yeah, I'm interested. I have a 42S, too, and would like to rotate it in/out of professional / home use and be able to calculate elapsed days. If it makes it easier, my email address is....

s_easterling@earthlink.net

Thanks!

Stephen
Melbourne, FL

Also check out the PPC ROM Manual (for the HP41) for the functions CJ and JC, these have an excellent backgrounder. These work with both Julain and GRegorian calendars.

Meindert


And are a good starting point for all this. Not very long and they work.

Have a look at the Calendar Functions program for the HP-67/97
Its quite readable and well documented

http://www.hpmuseum.org/software/67pacs/67calend.htm

**vp


I was wrong above: the program I adapted for the 42S, is this one for the 67 of the software library.
I also wrote a version for the 41.

Raul


It might be appropriate to be careful about using days beween dates programs from the 1900's since many of those programs did not recognize that the year 2000 would be a leap year (the Y2K problem). If you translate one of those old programs you should check that the number of days between 01/01/2000 and 01/01/2001 is 366. The routine from the TI-59 Master Library mentioned in Gerson Barbosa's submission gets 366.

If you are a dedicated purist, and what RPNer isn't, you might want to check the number of days the routine finds between 01/01/4000 and 01/01/4001. It should be 365. The routine from the TI-59 Master Library gets 366, but everyone knows that AOSers aren't purists.


4000 will be a leap year since it is divisible by 400, won't it? Anyway, the program fails for 1700, 1800, 2100, 2200, etc. However I am not sure whether this is due to something wrong in the TI-59 Master Library routine or in the 15C program since I don't have a TI-59.
The 12C returns 365 for 01/01/2100-01/01/2101 and 366 for 01/01/4000-01/01/4001.

-----

I have just checked 01/01/2100-01/01/2101 and 01/01/4000-01/01/4001 on Miroslav Nemecek's TI-59 Emulator and the results match those of the 12C. I have to see what is causing the 15C program to return 366 for 01/01/2100-01/01/2101.

Edited: 30 Sept 2005, 11:36 p.m.


There was just a missing g INT in the third line. Here is a 15C lighter version after removing a lot of unneeded ENTER's:

001: f LBL 0 x<>y STO 0 x<>y ENTER g INT STO 2 Rv RCL 2 - 100 * ENTER
016: g INT STO 1 Rv f FRAC 4 10^x * STO 3 2 ENTER RCL 2 g TEST 7
028: GTO 1 RCL 3 1 - 100 / 1 + g INT .75 * g INT CHS RCL 3
046: 1 - 4 / g INT + RCL 2 1 - 31 * + RCL 1 + RCL 3 365 * +
067: g RTN
068: f LBL 1 RCL 3 365 * RCL 1 + RCL 2 1 - 31 * + RCL 2 .4 * 2.3 +
091: g INT - RCL 3 4 / g INT + RCL 3 100 / 1 + .75 * g INT -
111: g RTN
112: f LBL A GSB 0 RCL 0 GSB 0 RCL 0 - CHS
119: g RTN
120: f LBL B GSB 0 ENTER CHS 7 / g INT 7 * +
130: g RTN

Date format is MM.DDYYYY

f A: works just like the DeltaDYS on the 12C.

f B: similar to DATE on the 12C, but requires only one argument, the date, and returns 0=Sat, 1=Sun, ... 6=Fri.

On the 11C, g TEST 7 should be replaced with f x>y

Everything appears to be all right now. Sorry for the inconvenience.


I notice that you have Saturday=0 through Friday=6, but ISO 8601
defines the day of week numbers as Monday=1 through Saturday=7,
presumably in accordance with European calendars starting the week
on Monday.

Here in the U.S.A., our calendars have stuck with the tradition of
the week starting on Sunday, so the ISO numbers seem very strange.

Just out of curiosity, of the cultures represented in this forum,
which ones start the week with Sunday, and which start it with
Monday (or the equivalents in the local language)?

Does anyone know when European calendars switched to starting the
week with Monday? Or why, for that matter? Was it just to
emphasize that secular culture isn't bound by church rules?

Regards,
James


Quote:
I notice that you have Saturday=0 through Friday=6, but ISO 8601 defines the day of week numbers as Monday=1 through Saturday=7, presumably in accordance with European calendars starting the week on Monday.
Here in the U.S.A., our calendars have stuck with the tradition of the week starting on Sunday

I thought it was quite the contrary, because as least in two European languages, Portuguese and German, the week seems to start on Sunday. The word for Wednesday in German is Mittwoch, which means, I think, "middle of the week". If this is correct, then Wednesday is the fourth day of the week and therefore Sunday is the first day.

In Portuguese, as I have already mentioned, the business days are ordinal numbers: segunda-feira, terça-feira, quarta-feira, quinta-feira and sexta-feira, litteraly "second fair", "third fair",... "sixth-fair" (fair = market place). I think this is because the medieval fairs that were held throughout the week, but I may be wrong (I have heard of another reason, but I don't remember what should it be).

If European calendars now start the week on Monday, you may be right about the reasons. Soon after the French Revolution, for a while they even abandoned the Gregorian calendar.

Regards,

Gerson.


Note that language doesn't always stay in synch with the calendar. For example, our English September, October, November, and December have roots in the Latin for seven, eight, nine, and ten, even though March hasn't been the first month for quite some time.

Regards,
James

Edited: 2 Oct 2005, 2:15 a.m.

Quote:
I thought it was quite the contrary, because as least in two European languages, Portuguese and German, the week seems to start on Sunday. The word for Wednesday in German is Mittwoch, which means, I think, "middle of the week". If this is correct, then Wednesday is the fourth day of the week and therefore Sunday is the first day.

Before 1976 in Germany Sunday was the first day of the week, since 1976 Monday is the first day according to DIN 1355 (for those who understand German http://de.wikipedia.org/wiki/Woche).

About a later question if calendar weeks are used, I can definitely say "Yes" for Germany. Mostly every working dead line is given as calendar week. In practise this means, when the dead line is for example KW39 (German for Kalenderwoche 39, 09/26/05-10/02/05) you should have it on Monday KW40. ;-)

Finally I want to point to my date conversation routines for the HP-42S which can be found at http://www.hp42s.com/programs/date/date.html working with every date of the Gregorian calendar (October 15/1582 to December 31/9999). Technical notes about implementation can be found at http://www.hp42s.com/programs/date/olddate.html.

Regards,

Christoph, Germany


Thank you! I was very curious as to when the week changed from
starting with Sunday to starting with Monday for part of the
world.

Does anyone know of a country that changed earlier?

But really now, a DIN was published and everyone changed their
calendars just because of that?

Okay, I realize that it's an ISO standard and ANSI (American
National Standards Institute) is a member, but I wouldn't expect
our calendars to change in the foreseeable future. Even (or
perhaps especially) if the government were to recommend the
change, Americans often tend to stick with tradition. For example,
our packages for most consumer products usually have SI units on
them where applicable, but rarely lack showing the "customary"
units as well.

"Weekly planning" pages in business "planners" start with Monday
with small entries at the end for Saturday and Sunday, (a bit
annoying for most of us) but the full-month and full-year
calendars in them start the week with Sunday.

But the planners do show the ISO 8601 week number on the weekly
and daily pages, as well as the day of year and days remaining in
year on the daily pages. I suppose they'd be useful if one were
ever dealing with someone who used them, but the general consensus
around here seems to be that the week numbers don't make any sense
at all, so they're simply ignored.

"KW40" is just fine for use within German-speaking countries, but
even if you find an American familiar with ISO week dates, he's
not likely to recognize that as meaning a week of the year.

Of course an American would understand 10/02/05 or 10-02-05 as
meaning October 2nd, 2005 without a second thought, and if even
slightly acquainted with German notation, would understand
02.10.05 to be the same date. But written as 02/10/05, 02-10-05,
10.02.05, or 05-10-02, it's probably going to be misinterpreted
over here. Personally, I prefer 2005-10-02, particularly for
international use, or else October 2nd, 2005. Of course printed
forms often indicate that the date should be in MM/DD/YYYY
notation.

I doubt that ISO week dates will catch on in the U.S., except
perhaps for very limited uses.

First there's the oddity of the week starting with the "wrong"
day, and the days being numbered "wrong".

Worse, the first week of the year may lack up to the first 3 days
of the year, or may include up to the last 3 days of the previous
year, and correspondingly, the last week of the year may include
up to the first 3 days of the next year, or lack up to the last 3
days of the year. Okay, for purposes of comparing statistics for
the weeks among years, I don't see any way to avoid such problems,
at least not without causing even worse problems. But it's
difficult for me to imagine ever using such a system for
scheduling purposes or recording events.

Regards,
James


Quote:
@James
:

:

:

"Weekly planning" pages in business "planners" start with Monday
with small entries at the end for Saturday and Sunday, (a bit
annoying for most of us) but the full-month and full-year
calendars in them start the week with Sunday.

But the planners do show the ISO 8601 week number on the weekly
and daily pages, as well as the day of year and days remaining in
year on the daily pages. I suppose they'd be useful if one were
ever dealing with someone who used them, but the general consensus
around here seems to be that the week numbers don't make any sense
at all, so they're simply ignored.

"KW40" is just fine for use within German-speaking countries, but
even if you find an American familiar with ISO week dates, he's
not likely to recognize that as meaning a week of the year.
:

:

I doubt that ISO week dates will catch on in the U.S., except perhaps for very limited uses.
:

:

:


Hi James

That's funny, we all here are aficionados of artefacts that really does catch with week days: our hp calculators.

Have a look at the serial number coding that hp uses for the calculators.

Here they are - in a big U.S. company. The calendar weeks you call obsolete... :-D

Valentino


First off, the use of a calendar week number in HP serials would be an example of "very limited use". And yes, I was well aware of it. I wonder, does HP's week numbering system follow ISO 8601? There are quite a few other ways one could number the weeks in a year.

I never called it "obsolete", just of limited usefulness.

Regards,
James

Edited: 12 Oct 2005, 6:06 a.m.

Quote:
Finally I want to point to my date conversation routines for the HP-42S which can be found at http://www.hp42s.com/programs/date/date.html working with every date of the Gregorian calendar (October 15/1582 to December 31/9999)

Very interesting routines! There's even one for calculating the day of the Easter!

About twelve years ago a wrote a 42S program for doing this. No, not for religious purposes, just for planning my vacations. I had to choose my vacations at least six months in advance, and I wouldn't want them to coincide either with Carnival or Easter, since here they are a five-day holiday anyway :-)

By what I can remember, the program is based on a formula by Euler (I simply ported a BASIC program that was published in a local scientific magazine to the HP-42S). It works for any year in the range from 1900 to 2099 (enough for what I had in mind). For example, given 2005 the output will be:

Carnival: Feb-06-2005
Easter: Mar-27-2005

The program (361 bytes long) is far from being of general interest. Anyway, I can provide a .RAW file for Emu42 (Thanks, Christoph!) if anyone is interested.

Regards,

Gerson.

Edited: 7 Oct 2005, 1:18 p.m.

Quote:
Does anyone know when European calendars switched to starting the week with Monday? Or why, for that matter? Was it just to emphasize that secular culture isn't bound by church rules?

I did some googling. It turns out the reason is theological:

1) The third commandment says: Remember thou keep holy the Sabbath day

2) The Christian Sabbath is Sunday

3) The Sabbath is the seventh day

Therefore, Monday is the first day of the week. QED.

Here are some links:

The Days of the Week. Lots of information about weekdays names in different languages, and this:

Quote:
The convention, becoming more common, to start calendar weeks on Monday, is a result of the Western European names, especially the German ones, which do not call Saturday the Sabbath -- or do not do so anymore in a recognizable way. Since Christians, especially Protestants, think of Sunday as the "Sabbath," the tendency is to number it as the 7th, rather than as the 1st, day. Familiarity with Greek or Arabic, or several Romance languages, however, would inform one that Saturday remained the Sabbath, as in Hebrew, even for Christians and Muslims.

Sunday:

Quote:
In ancient Jewish tradition Saturday is the sabbath. Many languages lack separate words for "Saturday" and "sabbath". Eastern Orthodox churches distinguish between the sabbath (Saturday) and the Lord's day (Sunday). Roman Catholics put so little emphasis on that distinction that many among them follow — at least in colloquial language — the Protestant practice of calling Sunday the sabbath.

Sunday is NOT the Sabbath!. This page explains why real protestants keep Saturday holy:

Quote:
So which authority do you acknowledge, the Word of God that commands seventh day Sabbath worship or the Tradition of the Catholic Church which commands Sunday, first day worship?
There is no other choice.


Granted, the Jewish may use "Remember the Sabbath Day to keep it
holy." My understanding is that the Hebrew names for the first six
days of the week mean simply first through sixth, and that
"Sabbath" comes from the Hebrew word for "rest", not "seventh".
Since the Old Testament tells us that God rested on the seventh
day, the Jews (and some Christians) quite naturally observe their
day of rest (their Sabbath) on the seventh day of the week; surely
God's example should be a good thing to follow.

Since the word "remember" is used in the commandment, I surmise
that it was an established tradition that was sometimes forgotten
or ignored.

Note that the seven-day week wasn't restricted to Jews in
pre-Christian times; at least the Romans used it. Where and when
it started and how widely it was used, I don't know; I suppose
that the obvious answer for "where" would be in the Garden of
Eden, and for "when" would be when God rested after Creation.

If I recall correctly, my catechism said "Remember to keep holy
the Lord's Day." Anyway, keep in mind that these commandments are
abbreviated (and translated, or perhaps mistranslated) forms of
the full text of the Old Testament. Note that Christians generally
consider the New Testament as superceding the Old Testament, so
old rules could be replaced by new rules. From my reading of the
Bible, it seems to me that God changed his policies quite a few
times; for anyone who believes that Christ was God incarnate,
surely Christ's authority overrides anything in the Old Testament.
As the New Testament tells us that Christ's resurrection as well
as the Holy Ghost's descent occurred on Sunday, many Christians
(particularly Roman Catholics and most Protestants) consider
Sunday to be the "Lord's Day", and thus the day of rest (the
Sabbath). Surely many early Christians preferred not to honor the
Jewish holy day. That doesn't mean that the first day of the week
suddenly became the seventh day of the week, but rather that the
holy (and rest, or Sabbath) day changed from the seventh day to
the first day (for these Christians).

As far as I can determine, the traditional seven-day cycle of the
week was unbroken for thousands of years, although of course
various cultures used various names for the days of the week, and
(many) Christians changed the day of rest from the seventh day to
the first day, and for that matter, Muslims changed it to the
sixth day, but with Sunday (or the equivalent in the various
languages) still considered to be the first day of the week. As
far as I can figure out, starting the week on Monday seems to be a
relatively recent (20th century?) European innovation.

Anyway, in the U.S.A., calendars still show the week as starting
on Sunday. Although in "planners" (such as Franklins), intended
primarily for business use, "weekly" pages start with Monday, with
smaller entries at the end for Saturday and Sunday, and both the
"daily" and "weekly" pages show the ISO 8601 week of year number.
That said, even in a Franklin planner, full monthly and yearly
calendars show the week as starting on Sunday, and of course, the
ISO 8601 week of year and day of week isn't often (ever?) used in
the U.S.A.

So where does the week start on your calendar?

For that matter, do you ever use the ISO 8601 week of year and day
of week numbers?

By the way, I'm trying to avoid starting any religious-based flame
war here; I'm not saying that any particular religion is right or
wrong. Still, religions have certainly influenced history,
particularly the history of calendars.

Regards,
James

Edited: 2 Oct 2005, 8:44 a.m.


Quote:
As far as I can figure out, starting the week on Monday seems to be a relatively recent (20th century?) European innovation

I think that if the reason really was to make Sunday the seventh day of the week to make it fit the Bible, then it sounds more like a 18th or 19th century thing, at the latest. Few 20th century Europeans would bother.

Quote:
So where does the week start on your calendar?

The week always starts on Monday here. Software that does not allow configuration of the start of the week is broken.

Quote:

For that matter, do you ever use the ISO 8601 week of year and day of week numbers?



ISO 8601 Week numbers are used a lot, for holiday planning and anything that references a specific week. There is not much reason to number the days in a week (except internally in software), they have names.

My Nokia supports weeks starting on Saturday, Sunday or Monday, and shows ISO week numbers if it starts on Sunday or Monday.

Quote:
By the way, I'm trying to avoid starting any religious-based flame war here; I'm not saying that any particular religion is right or wrong.

No, that was my worry after I posted :-)

Quote:
Still, religions have certainly influenced history, particularly the history of calendars.

Yes, it is very interesting to discover the logic, to the extent there is any, behind the things we take for granted. It is very often based in religion.

In Chinese, Monday is "Week 1" Tuesday "Week 2" etc until sunday which is "Week Day"
Also, the name of months is easy January "1 Month" up to "12 Month"

Arnaud


So it seems that they start the week with Monday in China, surely a large proportion of the world's populataion.

How about in the U.K.?

Regards,
James

Must be a part of the algorithm I'm unfamiliar with. Why wouldn't 4000 be a leap year, since it's divisible by 400?


In the Gregorian calendar, a year divisible by 4 is a leap year, unless it's also divisable by 100, in which case it's not a leap year, unless it's also divisible by 400, in which case it's a leap year after all.

Regards,
James


Yes.


Sorry Howard, I guess that I got mixed up as to whom I meant to reply to.

By the way, I strongly suspect that what Palmer had in mind was a proposed additional rule, suggested by the famous astronomer John Herschel, that years divisible by 4000 not be leap years. This would change the average calendar year length from 365 97/400 days to 365 969/4000 days, and would be closer to the observed length of a tropical year, although still a trifle long. However, as far as I know, no church, government, or standards organization has ever officially adopted this rule; it's certainly not part of the Gregorian calendar.

Of course, with the leap seconds, years are (on average) slightly longer, and I suppose that leap seconds will be needed more frequently in the future, which would move the calendar even farther out of synchronization with the seasons, so maybe Herschel's proposed rule wouldn't be enough by the time the year 4000 gets here. But I've read that the U.S. has (unfortunately, IMO) proposed eliminating these adjustments to keep UTC in synch with astronomical time.

I think dealing with the leap seconds is enough for now; changes to the calendar rules can be left for future generations to deal with.

Regards,
James


Quote:
This would change the average calendar year length from 365 97/400 days to 365 969/4000 days,

According to HP, there are 365.242198781 days per year.

Actually, at least in the 48/49 series, the units base for 1 year is 31556925.9747 seconds, but I don't know where they got that value from. Of course they equate 1 day to 86400 seconds, so they don't attempt to take leap seconds into account. So yes, 1_yr converts to 365.242198781_d in these calculators.

Anyway, a Gregorian calendar year, averaged over the 400 year cycle, is 365.2425 days. With Herschel's proposed change, averaged over the resulting 4000 year cycle, it would be 365.24225 days; still a little long.

Of course the Greek Orthodox calendar uses a different set of rules for exceptions to having a leap year every 4th year, which brings them a bit closer to the observed tropical year.

Regards,
James

Edited: 1 Oct 2005, 5:50 a.m.


That long number (31556925.9747) is from the definition of the ephemeris second as the fraction 1/31556925.9747 of the tropical year for 1900 January 0 at 12h ephemeris time.

I was relying on the following quotation from page 619 of Volume 4 of the 1969 version of Encyclopedia Britannica:

"... Later, a slight change was made in the Gregorian calendar to bring it still more closely into line with the tropical year. The Gregorian calendar was still in error by one day in 3,323 years and, in consequence, a further rule of intercalation has been adopted that makes the year 4000, 8000, etc., common years, i.e., years without an intercalated day. The calendar is now, therefore, correct to within one day in 20,000 years. ..."


I'm surprised.

At least ISO 8601:2000 section 4.3.2.1 includes:

"The Gregorian calendar distinguishes common years with a duration of 365 calendar days and leap years with a
duration of 366 calendar days. A leap year is a year whose year number is divisible by four an integral number of
times. However, centennial years are not leap years unless they are divisible by four hundred an integral number of
times."

Could it be that the Encyclopedia Britannica is mistaken?

That said, I haven't seen a copy of ISO 8601:2004, and don't feel like paying $101 for a copy of it.

Regards,
James


PS:

With an error of one day in 3,323 years, the proposal to drop leap years every 3200 years seems to make more sense. See: http://mindprod.com/jgloss/leapyear.html.

Of course, I don't see calendar reform as being particularly urgent.

Regards,
James


This is all very interesting and enlightening. I've learned a whole lot more about calendars than I knew before this thread. One thing I did know was that leap-seconds aren't added for the purpose of correcting for the base error in the calendar the way additional leap-year days are. They are there to compensate for the slowing of Earth's rotation, and consequent lengthening of the day.

But what makes us look for an even multiple of 100 to correct an error whose period is 3,323 years? In other words, why not make the year 3323 a leap year, instead of 4000 or even 3200?

Edited: 2 Oct 2005, 2:15 a.m.


Yes, seconds are added (or dropped, though that hasn't occurred)
to keep the clock very nearly in synch with Earth's varying
rotation, not to keep the calendar in synch with the seasons.

However, a leap second does have the additional effect of
lengthening the year, thus having a small effect on the
discrepancy between the calendar and the seasons. After all, 86400
leap seconds would have the same effect on this as one extra leap
year.

How many years will it take for 86400 leap seconds to accumulate?
I don't know; I haven't researched that, but since tidal forces
are slowing Earth's rotation, it seems reasonable to expect that
leap seconds will be needed more frequently in the future. Unless,
of course, we actually do stop using leap seconds and just allow
astronomical time to drift farther and farther out of synch with
clock time.

As for looking for an integer multiple of 100 instead of simply
using multiples of 3323 to make additional corrections to the
calendar, we'd want to (in addition to our current rules) drop a
leap year around that time, not add one, so it would at least have
to be a year that would be a leap year by the other rules.
Clearly, the year 3323 is out; how about years that are integer
multiple of 3324? At first, that seems to work, but how about the
year 83100 (25*3324)? That wouldn't be a leap year by the current
rules. Even just a multiple of 100 wouldn't suffice, as 3 out of 4
multiples of 100 aren't leap years by current rules. It seems to
me that it would be best to use years that are multiples of 400
(always leap years by current rules), such as 3200 or 4000, for
any additional rule.

Of course, by the year 83100 (or even 3323, for that matter), who
knows what kind of clock and calendar systems they'll be using?
Will they remember an extra rule? (Recall the questions of whether
the year 2000 would be a leap year.) How many leap seconds will
have accumulated by then? Will they still be using a decimal
number system, or will they have changed to, say, an octal or
hexadecimal system for everyday counting by then? Will they feel
bound by "the dead hand of the past"?

Maybe we'll just wait until the discrepancy between the calendar
and the seasons is (averaged over a 400 year cycle) a whole day
and then drop a leap year.

By the way, the Gregorian leap year rules are intended to keep the
vernal equinox on or near March 21st, as it was at the time of the
First Council of Nicea (A.D. 325), which determined that March
21st (regardless of the actual equinox) should be treated as the
vernal equinox for Easter calculations, which explains Pope
Gregory XIII's interest in the matter. More information on this
can be found at http://www.newadvent.org/cathen/03168a.htm.

Of course, even though the calendar reform was for ecclesiastical
purposes, keeping the calendar in synch with the seasons also
serves a secular purpose.

Regards,
James


Ok, folks, let's strive to reach the year 3323 at all!

Remember oil will be exhausted within the next 50 years. And there is the greenhouse effect leading to some more severe hurricanes and similar stuff.

Oh sorry, I forgot, according to the present administration there is no greenhouse effect! So there is a good (?) chance a well known superpower will start a war on this with the result there is no need for long range calendar corrections anymore.

Good luck! ((;-)


Hey, I'm pretty certain that I, personally, won't reach the year 3323.

Yes, there are certainly plenty of problems far more urgent than additional leap year reform to be solved. I think we can leave that issue for (hoped-for) generations far in the future to address.

Of course, I do rather wish that the silly ISO 8601 week of year numbers would be dropped; since a Gregorian calendar year never has an integer multiple of 7 days in it, there doesn't seem to be any good way to number the weeks of the year.

And since there seems to be very little chance that those cultures that start the week with Sunday will ever use the ISO day of week numbers starting with Monday as 1, they seem much more likely to cause confusion than to standardize usage

Regrds,
James

Hi all. Interesting thread.

NOTE: The following IS kinda o.t.: (but provided as a community service announcement of sorts)

Actually the permanent oil crisis is here now.
Although many still aren't too aware (state of denial) and
figures in the tens of years (50,100) are often seen, the data
are scary, much closer than 50 years.

The (fatal?) impacts will probably arrive in an irreversible form
within TEN years, maybe FIVE. Consider that running out of oil is not the problem, but the END OF CHEAP OIL is. See www.aspo.org

Maybe someone might like to do a quick simulation (on an hp calc of course) to predict economic collapse from incremental rise in oil prices (with resulting flow on effects into EVERY COMMODITY REQUIRING TRANSPORT). The modern economy is in fact very fragile and Bush and Cheney know it. So does John Howard and Tony Blair.

Of course, one (tried and tested) way to avoid collapse is to steal
assetts / resources from other countries under a pretext. That action only staves off the end, of course. I saw a documentary called: End of Suburbia and can recommend it. Of course I have read extensively on this problem (only since april 2004). I am amazed how complacent most people still are about this problem.

All the best for the future everyone.

Don W

Edited: 2 Oct 2005, 2:51 p.m.

Quote:
Of course, even though the calendar reform was for ecclesiastical purposes, keeping the calendar in synch with the seasons also serves a secular purpose.

In order to achieve this, shouldn't we also compensate for the effect of the precession of the equinoxes on the dates seasons begin? Any ideas?

Regards,

Gerson.


Quote:
Quote:
Of course, even though the calendar reform was for ecclesiastical purposes, keeping the calendar in synch with the seasons also serves a secular purpose.

In order to achieve this, shouldn't we also compensate for the
effect of the precession of the equinoxes on the dates seasons
begin? Any ideas?


I think that if we were using a sidereal (star-based) calendar
year, based on something like keeping the rising of a particular
star near the ecliptic at a certain time on a particular day of
the year, you'd have a very good point.

But in fact the Gregorian calendar is designed to keep the
observed vernal equinoxes, on average, near March 21st, so
everything that's affected the timing of the vernal equinox is
already included, to the extent that the vernal equinox actually
does (on average) stay near March 21st.

Regards,
James

Perhaps neither TI nor HP expected their products to last until the year 4000 A.C. :-)

Though the calendar is now that accurate, you'll be celebrating Christmas in the Summer, like we do down here, by the year 15,000 A.C. ... Will this be a problem?

Besides your post being enlighting, it helped me spot a mistake in my listing that would prevent the program to work correctly for some years ending in 00. (My hand-written listing on the Master Library was ok though). Thanks.

Edited: 2 Oct 2005, 1:03 p.m.


Quote:
Perhaps neither TI nor HP expected their products to last until the year 4000 A.C. :-)

But, apart from battery problems and capacitors drying: Is the "plastic" body of a classic, woodstock, voyager, pioneer or 41/48/49 still all right in a few 100 years? Or even thousands? And what about the metal parts of the older calculators? And the platin and chips on it? How long could they last?

Anyone here with that material knowledge?


Assuming they are used, the ICs will eventually fail from electromigration of the metal layer. The time period depends on feature size and current density.

My guess is that plastic cases will become a problem. Some plastics become brittle with age. One of the prized items in my collection was a Speedee Add-a-matic (see the section of the museum on old calculators). Last spring I inadvertently knocked it off a table onto a terrazo floor. The plastic case shattered into about twenty pieces. The metal mechanism still works.

By comparison back in the early 1980's I inadvertently knocked my almost new Radio Shack Model 100 off the same table onto the same terrazo floor. There was a small crack in one corner of the case. Some of the keys came off and the batteries came out of the compartment. I put the batteries back in, pressed the keys back in place and the machine was able to complete the calculations that were in process. That machine still works today.

A "shock test" which illustrates how sturdy some of the hand-helds are when they are relatively new is the test of the oscillator described in the service manual for the TI-59. I'm not going to repeat that test today. Sorry about that! Who's going to do a drop test on his HP-35? I do have some old Sharps, Casios, and a number of spare TI-30's at my winter home. When I'm back there I just may have to do some drop tests.

I also have three of the Addometers (again, see the old calculator section) which were all metal and made by a typewrter manufacturer back in the 1920's. Two of the three work well. The third is somewhat rusty and the dials only turn with some difficulty.

A bad choice of metal can be a problem. The early Pickett slide rules used a magnesium alloy (I think) base. They often didn't move smoothly even when new but that problem can be solved these days with a little WD-40. Many of those now have the slide and frame fused together by corrosion. The late aluminum base devices have fewer problems.

"Though the calendar is now that accurate, you'll be celebrating Christmas in the Summer, like we do down here, by the year 15,000 A.C. ... Will this be a problem?"

Nope! It is, in fact, precisely the addition of leap years which KEEPS the seasons where they belong, due to the precession of the equinox. Us northerners will still have spring starting (about) March 21 and Christmas will still be in the winter.

What will happen in 13000 years (half of a precession cycle) is that the stars which you now think of as "winter" stars (again, for us northerners; perhaps better stated as "December" stars) will be instead the summer/June stars. i.e. the constellation Orion will be prominent on June/July evenings in the year 15000, rather then the December/January evenings when we see him now.

Another minor effect will be due to the ellipticity of the Earth's orbit. At this time, the Earth is closest to the Sun in early January. The effect on incoming solar energy is only a few percent, but this means that northern hemisphere winters are now somewhat warmer than they will be in 13000 years, when winter will be occuring when the Earth is farthest from the sun.

Leap seconds (or the alternative now being touted by some folks at the US Naval Observatory - officially charged with keeping track of time for the United States - of changing the rate of atomic time by about 20 parts per billion) keep the rotational position of the Earth aligned with the stars. I have to think a bit about whether the accumulated leap seconds affect leap years. The Earth is not only slowing down overall, but at the level of 10's of microseconds per day speeds up and slows down - somewhat at random but also with seasonal variations that basically relate to the fact that there is more land mass in the northern hemisphere than in the southern hemisphere.

This stuff is all very critical for very accurate (sub-centimeter) global geodesy. For more details on precise earth orientation and timekeeping, go to http://maia.usno.navy.mil .


Quote:
Nope! It is, in fact, precisely the addition of leap years which KEEPS the seasons where they belong, due to the precession of the equinox. Us northerners will still have spring starting (about) March 21 and Christmas will still be in the winter.


I always thought the addition of leap years keeps the seasons in place because this makes the year closer to its actual length. But the seasons shifts due to the precession of the equinoxes would not be corrected by this method. Have I misunterstood anything?

Here is an excerpt of Isaac Asimos's "A choice of catastrophes":

"... In 12890 years, the [Earth's] axis shall turn to the opposite direction... ...and the Summers's Solstice [in the northern hemisphere] will be on December 21, and the Winter's Solstice on June 21..." (This is a bad translation back to English. The actual text should be somewhat different, but hopefully I may have kept the right meaning).

This Message was deleted. This empty message preserves the threading when a post with followup(s) is deleted. If all followups have been removed, the original poster may delete this post again to make this placeholder disappear.


Don,

Precession can be viewed as the "sliding" of the celestial reference frame (right ascension and declination - "RA/Dec" in astronomer shorthand) which is tied to the Earth (basically projection of latitude and longitude onto the sky) along the ecliptic (the more-or-less plane of the planetary orbits).

If you think of the position of stars in an ecliptic coordinate system, they will not change with time. In the RA/Dec system, the star positions change continuously.

So yes, the RA/Dec of Orion will change, but Orion will still be in the ecliptic, as will ALL the ecliptic constellations (so beloved of astrologers (gack, I HATE that word!). The path of the Sun, as viewed from the Earth, will continue to circle around the ecliptic once per year.

Also, as I said earlier, leap years REALLY DO take care of the sliding of the seasons. The reason calendar reform was necessary was because the date March 21 was clearly no longer coinciding with the "beginning" of spring (defined as the day of the year on which the declination of the Sun is ZERO (i.e. the Sun was exactly on the celestial equator = Declination of the Sun is 0 degrees)). What was the problem: the length of the year was too short (as noted elsewhere in this discussion) if only 365 days were alloted to a year. So, leap years merely adjust the length of the year to match the actual time that the Earth takes to go around the Sun - with year here defined as the length of time from the beginning of one spring to the next spring. That's what our current calendar is based on - the spring-to-spring year.

If the date of the seasons was going to switch, we would have already seen the effect. This problem has been known, more or less, for several thousand years. That would be enough to switch the beginning of spring by a month (i.e. around a twelfth of the 26000 year precession period) - which has not happened.

So, (as long as we stick to the current calendar or some close approximation) Spring will continue to occur on March 21 for the forseeable future. In particular, for the next 13000 years.

For more on this, try

http://www-istp.gsfc.nasa.gov/stargaze/Sprecess.htm


Quote:
If the date of the seasons was going to switch, we would have already seen the effect. This problem has been known, more or less, for several thousand years. That would be enough to switch the beginning of spring by a month (i.e. around a twelfth of the 26000 year precession period) - which has not happened.


Now you have convinced me! Thanks!

Ne sutor ultra crepidam.

From now on this shoemaker will stick just to heels, soles, shoelaces and the like :-)

My attempt to explain the "precession of the equinoxes",
Milankovitch cycles, leap years...

But I'm not anastronomer; I wouldn't even consider myself an
"amateur astronomer" (I don't even have a telescope). But I do
find astronomy, calendars, and time-keeping interesting. Maybe I'm
an "armchair astronomer"? Anyway, take the following with a few
grains of salt.

First off, we have at least three major definitions of a year
based on astronomy, in addition to the various calendar years.

A "tropical" year, the period of the seasons. For example, from
vernal equinox to vernal equinox; our Gregorian calendar year is
based on this.

A "sidereal" year, the period of the earth's revolution around the
sun in relation to the "fixed stars", or equivalently, the
apparent position of the sun against the starry background. Of
course, the stars, galaxies, quasars, and so on are actually
moving, but due to their immense distance from us, except for the
nearest stars, any change in their apparent angular relationships
as viewed from the earth is negligible. A sidereal year is about
20 minutes longer that a tropical year. Note that even the length
of the sidereal year is changing, presumably due to transfers of
angular momentum among the bodies of the solar system, "friction"
with interplanetary gas and "dust", the affects of the solar wind,
and so on. Everything in the universe affects everything else.

An "anomalistic" year, the period from the earth's perihelion
(closest approach to the sun in its elliptical orbit) to its next
perihelion. An anomalistic year is about 25 minutes longer that a
tropical year, or 5 minutes longer than a sidereal year. This
precession is due (at least mostly) to perturbations of our orbit
from the major planets, particularly Jupiter and Saturn. The
period of this precession (in relation to the fixed stars) seems
to be about 114000 years. The eccentricity (how nearly a true
circle the orbit is) is thought to vary too, with a period of
about 95000 years.

The ecliptic is the plane of earth's orbit, so called because an
eclipse of the sun or moon occurs when the moon crosses this plane
very nearly at the new or full moon. Of course the sun, as viewed
from the earth, always appears to be on the ecliptic. The
constellations that appear to be on the ecliptic are called the
zodiac. The sun, as viewed from the earth, appears to move through
the zodiac once per sidereal year. As noted in another post, the
ecliptic is very stable (at least in terms of human history), and
except perhaps for some relatively nearby stars, so is the zodiac.
Of course, when the sun evolves into a red giant, that will effect
Earth's orbit, to put it mildly, but no one on Earth will be
concerned with that. The moon's orbital plane around the earth is
at an angle of about 5.1 degrees to the ecliptic. The orbital
planes of the other planets, except Pluto, are near the ecliptic,
ranging from about 0.8 degrees from the ecliptic for the orbital
plane of Uranus to 7.0 degrees for Mercury's, so the planets also
appear to be near the ecliptic. Even Pluto's orbital plane is only
about 17.2 degrees from the ecliptic.

The celestial equator is the earth's equator projected into the
sky. Of course the plane of the celestial equator is perpendicular
to the earth's axis of rotation.

The celestial poles are the earth's axis of rotation projected
into the sky. Currently, the north celestial pole is near Polaris
(the North Star).

Currently, the planes of the ecliptic and celestial equator are at
an angle of about 23.5 degrees, though that's thought to vary a
few degrees with a period of about 41000 years.

An equinox occurs when the earth passes through the line of
intersection of the planes of the ecliptic and the celestial
equator.

Because the earth spins, it has an equatorial bulge. The sun's and
moon's gravity pull on this bulge, one might say trying to pull it
into alignment with a line from the sun to the moon, in effect,
applying a torque to the earth's rotational axis. As anyone who's
played with a gyroscope should recognize, the affect is to cause a
precession of the earth's axis, causing it to sweep out a (more or
less) cone in the sky, relative to the fixed stars. This
precession has a period of about 26000 years, relative to the
fixed stars. One effect is that Polaris is near the axis only
periodically; the stars (as viewed from the northern hemisphere)
won't always appear to revolve around it. The celestial poles move
in (more or less) circles in the sky. Since the plane of the
celestial equator is perpendicular to the axis, as the axis
precesses, this plane "wobbles" (for lack of a better term) in
synch with it, and of course, this causes its line of intersection
with the ecliptic plane to rotate one full turn for every period
of the precession, and thus the equinoxes to move relative to the
fixed stars, so the apparent position of the sun at the time of
the vernal equinox moves through the zodiac once for every period
of precession. Note that there are also smaller. faster,
oscillations of the axis, known as nutations.

As noted above, the point of perihelion is precessing, and the
combined effect of this precession with the precession of the
equinoxes in the opposite direction is that the period of Earth's
perihelion coinciding with the vernal equinox is about 21000
years.

Because the earth's orbital speed (like a comet's) is fastest at
perihelion (currently about January 3rd) and slowest at aphelion
(currently about July 5th) the length of the seasons vary too;
currently shortest for (northern hemisphere) winter, with autumn
longer, then spring, and summer longest.

We all know that the sun appears to revolve around the earth due
to the earth's rotation, but actually, the sun's apparent daily
motion across the sky is a combination of both the earth's
rotation and its revolution around the sun.

After all, if the earth didn't rotate at all in relation to the
fixed stars, the sun would appear to revolve around us once per
sidereal year, in the direction opposite to what we're familiar
with. As the earth is both closest to the sun and at its highest
orbital speed at its perihelion, the sun's apparent motion from
the earth's revolution around the sun would be fastest at
perihelion.

A sidereal day, the period of Earth's rotation relative to the
fixed stars, is about 3 minutes 56 seconds shorter than a mean
solar day. The earth really rotates, relative to the stars, about
366-1/4 times per year, but Earth's revolution around the sun
makes the sun appear to revolve around the earth only about
365-1/4 times per year, that is, the earth's revolution around the
sun slows down the apparent motion of the sun around the earth.

Because the earth's orbital speed is fastest at perihelion, and
the distance to the sun is shortest, the sun's overall apparent
motion is slowest at perihelion, so a solar day (as from high noon
to high noon) is longest near perihelion.

No doubt Earth's actual orbit is much more complicated than I've
mentioned, but I think that I've covered the most important
points.

The relationships of the above periodic motions are the bases of
Milankovitch cycles, which may well have an affect on our climate,
though they don't totally account for the apparent climatological
record.

To simplify timekeeping, we use a "mean solar day".

Of course now we no longer define a second as 1/86400 mean solar
day, but rather define a second by atomic clocks, and a day as
86400 seconds, adding (or potentially dropping) a second
occasionally as needed to keep UTC close to astronomical time.

As noted in another post, earth's rotation varies, and it's
difficult to predict exactly how long a solar day will be. Before
accurate timekeeping was available, a day was a solar day. Exactly
how long was a solar day in Caesar's or Pope Gregory's time? At
first glance, that would seem to be a good question for
geophysicists, but maybe astronomers can have an important role in
this. Because the earth's and moon's orbits are known, astronomers
can determine when an eclipse occurred in the past. By looking at
records of eclipses, some answers as to the exact date of some
events can be found, even though various calendars were used.
Astronomy can also tell us where a solar eclipse should have been
visible from; comparing this with the historical record could give
us information on the rotation of the earth. Of course, an
astronomer may well respond "been there, done that".

Regarding leap years, to be pedantic, they're used simply because
a tropical year, rather inconveniently, doesn't happen to be a
whole number of days long.

Before Julius Caesar's reform, Roman years varied in length,
typically with 355 days, with an extra month added to the year as
needed to bring the calendar back close to the seasons. Sometimes,
as in times of war, they neglected to add the extra month. Besides
the rather irregular length of year, exactly when to add the extra
month was subject to political/financial pressures, a rather
unsatisfactory situation for many.

Of course now we change the dates of the "fiscal year" instead,
and Michigan's government is currently shifting the dates of its
"property tax year". Of course, they're not increasing the taxes,
they're just having the counties collect taxes earlier every year
for the next few years. Yeah, right....

Anyway, a fixed-length year would be an obvious solution the
Romans' problems with the calendar, but a 366-day calendar year is
too long, and a 365-day calendar year is too short. Having a
"partial day" in every calendar year would seem rather
inconvenient.

Julius Caesar's calendar reform came fairly close. The idea is to
keep the average calendar year very nearly the same length as the
average tropical year, while also keeping each calendar year a
whole number of days long, and varying the length of the calendar
year by only 1 day. Three calendar years of 365 days followed by
one of 366 days, and repeating this cycle indefinitely, was an
elegant solution.

Unfortunately, with Julius Caesar already dead, his reform was
apparently misunderstood to mean a leap year every three years,
and this error was finally corrected by Caesar Augustus after 36
years.

Of course it would've been more "elegant" to distribute the days
of the months something like the following:

Month    normal year   leap year
number length length
1 30 30
2 31 31
3 30 30
4 31 31
5 30 30
6 31 31
7 30 30
8 31 31
9 30 30
10 31 31
11 30 30
12 30 31
___ ___
total 365 366

and for that matter, start both month #1 and the year on (okay,
near) the day of the vernal equinox.

Why the vernal equinox? Well, it's the beginning of spring, a
season that seems to me symbolic of renewal (birds, bees, eggs,
flowers, bunnies, etc.), and an equinox is fairly easily
verifiable by rather simple astronomical observation, and thus a
good time to start a new year. On the other hand, the solstices
seem to me even more obvious (sunrise and sunset farthest south or
north, sun at "high noon" farthest south or north relative to the
zenith), so wouldn't be bad choices, although the changes in
sunrise/sunset direction and the daily highest point of the sun
are smallest near the solstices and greatest near the equinoxes.

Of course the year has actually started on various dates in
various cultures.

But the Julian calendar was certainly a huge improvement from the
previous Roman system. Besides, February is such a depressing
month around here that I'm rather glad that it's the shortest of
all.

Notably, under the Julian calendar, the vernal equinox was
considered to be on the 21st of March, regardless of the actual
astronomical date, and for the purpose of calculating the date of
Easter, it still is by most western Christian churches, even with
the Gregorian calendar. By Pope Gregory's time, it was evident
that the average calendar year was too long, with an all too
noticeable accumulated error of about 10 days in the date of the
vernal equinox. Rather than totally discarding the existing leap
year rules and starting over, they chose to modify them, dropping
3 out of every 100 leap years.

Of course they also dropped 10 calendar days, so 1582 had only 355
days, at least in the Vatican's reckoning.

In my opinion, it might've been simpler to just acknowledge that
the vernal equinox was actually on a different date, and settle
for the leap year modifications to keep it from drifting much
farther. Maybe it would've been easier to get the rest of the
world to go along with this? But this still would've changed the
date of Easter, giving the Protestant churches yet another reason
to condemn the Pope.

Of course other leap year rules, some arguably better, can be (and
have been) devised, but for now, most of the world has adopted the
Gregorian calendar, at least for most secular purposes.

Regards,
James


Quote:
Of course they also dropped 10 calendar days, so 1582 had only 355
days, at least in the Vatican's reckoning.

In my opinion, it might've been simpler to just acknowledge that
the vernal equinox was actually on a different date, and settle
for the leap year modifications to keep it from drifting much
farther.


But after thinking a little more, I realize that this would've
been a big problem for the liturgical calendar. The entire Easter
cycle could occur as much as ten days earlier, and without
changing the timing of the Christmas cycle, the Easter cycle could
begin before the "time after Epiphany" (the last part of the
Christmas cycle) had even begun. No wonder they chose to keep the
vernal equinox on March 21st.

Regards
James

Quote:
Perhaps neither TI nor HP expected their products to last until
the year 4000 A.C. :-)

"A.C."?

Indeed, the valid "system time" on the 48/49 series covers only a
100-year range. For the 48SX/S, 1989-01-01 through 2088-12-31, and
for the 48G series and 49 series, 1991-01-01 through 2090-12-31.
Attempting to set a date outside of these ranges results in an
"Invalid Date" error. Setting a date and time just before the
maximum and letting it tick up to midnight results in a warmstart,
with WSLOG showing a "System time is corrupt" entry, and for the
48 series and 49G, the system time jumps back 100 years, but
strangely enough, my 49g+ jumps back only to 2003-01-01. Trying
CLKADJ to try adjust it out of range either earlier or later jumps
it to these same times, but without causing a warmstart.

I find it interesting that they didn't move the range ahead a bit
for the 49 series.

Apparently it's an "artificial" restriction; with the 52-bit clock
at 8192 ticks per second, they could've made the range far larger.
It turns out that a binary system time (as from TICKS) of #0 would
correspond to exactly time 00:00:00 on 0000-01-01 in a proleptic
Gregorian calendar, and a binary system time of #FFFFFFFFFFFFF
would be sometime in late January, 17421.

Maybe they simply chose the range so that TSTR would only have to
use 2 digits for the year?

Similarly, the range of 1582-10-15 through 9999-12-31 for date
arithmetic seems "artificial". It seems to me that, assuming a
proleptic Gregorian calendar, the range could've been 0000-01-01
through 99999999-12-31. I'm not sure how much trouble it would've
been to allow negative years, but if it were feasible at all, I
suppose that they could've gone back to January 1st, -99999999.

But I doubt that they expected the calculators to still be in use
even in 2088. They may well be surprised that the older models, or
even the 48SX/S, are still in use even today.

But with the most recent models, I sometimes can't quite help
suspecting that they designed in some planned obsolescence.

Quote:
Though the calendar is now that accurate, you'll be celebrating
Christmas in the Summer, like we do down here, by the year 15,000
A.C.

Well, barring some major medical breakthroughs and several other
near miraculous circumstances, I won't be around here then.

As others have pointed out, maybe it could be considered
miraculous if humans weren't in a long "dark age" by then, if not
extinct.

Anyway, the way I figure, ignoring the effects of leap seconds,
and assuming no adjustments other than the current Gregorian
calendar rules were made, the seasons would occur only a bit less
than 4 days earlier in the calendar year then, and I doubt that
leap seconds would accumulate even a day's extra error in that
time, so I suppose anyone living around here would be celebrating
Christmas about 8 or 9 days after the winter solstice instead of
about 4 days after it.

Quote:
... Will this be a problem?

I rather doubt that the few days drift would be a problem, unless
accusations of heresy for not celebrating Easter at the proper
time become fashionable again.

Certainly it would be noticeable to astronomers, but I trust that
they'd be able to deal with it.

As for celebrating Christmas in the summer, at least they wouldn't
have to put up with freezing rain, sleet, and snow while trying to
do last-minute Christmas shopping, and the Christmas decoration
lights wouldn't be on for so long, thus saving energy. But the
kids would be trying out their new bicycles immediately, instead
of their new sleds.

Do Australians include artificial snowflakes, snowmen, and such in
their Christmas decorations?

Quote:
Besides your post being enlighting, it helped me spot a mistake in
my listing that would prevent the program to work correctly for
some years ending in 00. (My hand-written listing on the Master
Library was ok though). Thanks.

Well, I'm glad that it helped. I confess that I didn't even
attempt to follow the programs posted. The only "True RPN" model
that I have is thr 16C that I inherited, and though I did work
through the examples in the manual and try a few variations, I
haven't tried programming it since. The 16C is wonderful for
working with binary though.

Regards,
James

Edited: 4 Oct 2005, 4:19 a.m.


This Message was deleted. This empty message preserves the threading when a post with followup(s) is deleted. If all followups have been removed, the original poster may delete this post again to make this placeholder disappear.


Maybe your snowflakes and snowmen make it feel a little cooler? I
suppose that many early "settlers" often wished they were back in
Britain.

Regarding the pagan origins for Christmas, St. Valentine's day,
Easter (at least the eggs and bunny associations), All Saints'
Day, Thanksgiving, etc., I suppose that telling the pagans to quit
having their festivals would have been a dismal failure; much
easier to change them to (more or less) Christian festivals.

Around here, we really need something like Christmas
to cheer us up around that time of year. Personally, I'd like a
better celebration around Groundhog Day (February 2nd).

The kids colour hard-boiled eggs before Easter, so they know where
those came from. The usual story is that the Easter Bunny takes
them out of the refrigerator and hides them various places around
the house the night before Easter, but I don't think any of them
actually believe that. They know full well that the Easter candy
is from Gramma and Grandpa. Some organizations hold Easter egg
hunts for large groups of children, with chocolate eggs hidden
outdoors, but I don't think anyone believes any story that the
Easter Bunny left them.

Christmas is a different story though. I'm always amazed that most
children actually do seem to believe in Santa Claus until they're
about 7 years old. I don't remember ever believing in Santa Claus,
any more than I believed in Donald Duck or Bugs Bunny. We did
exchange presents of course, but no one pretended that Santa Claus
was anything other than an amusing myth. Maybe my parents thought
that Santa Claus was a bad idea for religious reasons, or maybe
they thought that with with three older brothers and an older
sister, I'd soon be told otherwise. I expect that their reasons
were religious; Christmas and Easter always started with going to
Mass, and the somewhat secular aspects were limited to a Christmas
tree, lights, decorations, exchanging gifts on Christmas, and more
elaborate dinners than usual, most of which had a religious
explanation; these were very clearly "holy days" more than
"holidays" in our home.

Regards,
James

Quote:
"A.C."?

I should have said AD (Anno Domini). As I know you use the abbreviation BC (Before Christ), I wrongly guessed you'd use also use AC (After Christ) as we do here.


About the dramatic seasons shifting as a consequence of the precession of the equinoxes, I was wrong as Dave Shaffer pointed out. By what I can see, contrary to what I thought, we are doomed to celebrating Christmas in the Summer for ever, a problem only for thousands of southern Santas that have work in Winter clothings under a tropical sun :-)

Regards,

Gerson.


A.C. (After Christ) is new to me, though I'm familiar with C.E. (Christian Era) and B.C.E. (Before Christian Era) for the proleptic Gregorian calendar. Incidentally, this is usually taken to have a year 0000, which is a leap year, so the same leap year rules apply for negative years.

For the Julian calendar, which doesn't have a year 0, A.D. and B.C seem to be the rule, but of course these have also been used for the Gregorian calendar. I suppose that C.E. and B.C.E. might by applied to the julian calendar too. I guess for dates before all western cultures adopted the Gregorian calendar (around 1750?), it's best to be specific about which calendar is meant.

For my niece's genealogical research, I think that "New Style" and "Old Style" dates have caused some apparent anomolies. Which date something occurred on depends on which calendar is used.

Regards,
James


More generally referred to in non-religious context as Common Era (CE) and Before Common Era (BCE). See the Wikipedia article on the Common Era.


Okay, now that you mention it, I think I've also seen "Common
Era", but the alternative of "Current Era" on that page makes more
sense to me.

But if they wanted to get references to Christ out of the date,
why didn't they choose some other epoch than the birth of Christ?
Using that epoch makes the connection to Christianity extremely
obvious.

And of course Gregory was a pope, so shouldn't we stop using the
term "Gregorian calendar"? Perhaps ISO 8601 should change all
occurences of "Gregorian calendar" to, for examples, "ISO
calendar", "common calendar", or "current calendar"?

Like it or not, Christianity has had a real influence on history,
including the epoch for our calendar.

Not that I feel that a calendar for secular purposes particularly
should have religious references, but since it already does, I
don't see any good reason to change that.

Regards,
James


The problem is that A.D. stands for Anno Domini, "Year of our Lord". For a huge number of people, Jesus isn't "our Lord".


Quote:
The problem is that A.D. stands for Anno Domini, "Year of our
Lord". For a huge number of people, Jesus isn't "our Lord".

Yes, obviously, but few would seriously doubt that Jesus Christ
was a very real historical person. Even those who might think that
the New Testament were completely fictitious wouldn't dispute the
historical reality of Christianity, hence my mistake that "C.E."
stood for "Christian Era". After all, whoever came up with "C.E."
and "B.C.E." didn't choose to base a calendar on a new epoch that
had nothing to do with Christianity.

Regards,
James

Edited: 9 Oct 2005, 1:14 a.m.

Quote:
But if they wanted to get references to Christ out of the date, why didn't they choose some other epoch than the birth of Christ?

So that they wouldn't have to change the dates of everything.

The epoch of the Gregorian calendar (and the Julian calendar) isn't really the birth of Christ anyhow; scholars seem to think that happened some time around 4 or 5 BCE.


Quote:
So that they wouldn't have to change the dates of everything.

So it seems to me that they weren't really very serious about
removing any religious references from the calendar. Obviously,
"A.D." (Anno Domini, Year of the Lord), would seem very
inappropriate to non-christians, but I don't see why anyone would
object to, for example, "Christian Era".
Quote:
The epoch of the Gregorian calendar (and the Julian calendar)
isn't really the birth of Christ anyhow; scholars seem to think
that happened some time around 4 or 5 BCE.

Yes, there's very good reason to believe that the birth of Jesus
of Nazareth actually occurred a few years before our calendar
would seem to indicate. However, the particular scholar (Dionysius
Exiguus) whose work the epoch is based on, apparently believed
that Jesus turned 1 year old in 754 A.U.C., so he established that
as the year 1 A.D. How certain he was, I don't know.

Regards,
James

Quote:
By the way, I strongly suspect that what Palmer had in mind was a proposed additional rule, suggested by the famous astronomer John Herschel, that years divisible by 4000 not be leap years.

The current Gregorian calendar is slow by 25.92 seconds/year (much better than the 11 1/2 minutes of the Julian calendar!); the Y4K proposal makes it slow by 4.32 seconds/year. However, that means that there will be a Y20K problem.

Note too that the Eastern Orthodox church in 1923 proposed an alternative rule to correct the leap year problem in the Julian calendar. In their system, century years modulo 900 must have a value of 200 or 600 to be considered a leap year. This first year of divergence is in 2800, where the Gregorian calendar has a leap year but the Orthodox calendar does not until 2900.

The Orthodox calendar is slow by 1.91 seconds/year, so their day of reckoning doesn't happen until Y45K.

An additional problem is that the end of the current interglacial period (not "the next ice age" since we're in the middle of an ice age now!) is due around Y25K and may cause further perturbations on the Earth's rotation and revolution.


re: "An additional problem is that the end of the current interglacial period (not "the next ice age" since we're in the middle of an ice age now!) is due around Y25K and
may cause further perturbations on the Earth's rotation and revolution."

As I try to make the difference when I teach Astronomy 101, "rotation" is the turning of the Earth on its axis, whereas "revolution" is the orbital motion of the Earth around the Sun.

So, while a new ice age may well affect the rotation rate of the Earth (due to changes in the moment of inertia of an ice-clad Earth) it WILL NOT affect the revolution (i.e. the orbital period).

Sorry to be so technical, but when among geeks and nerds, we should make sure we have it right!!


Quote:
So, while a new ice age may well affect the rotation rate of the Earth (due to changes in the moment of inertia of an ice-clad Earth) it WILL NOT affect the revolution (i.e. the orbital period).

Note that I said "the end of the current interglacial period" and not "the return of the glaciers." The latter is one aspect of the former. Consider the possibility that ice ages and interglacial periods are caused by something that also impacts the revolution of the Earth.

That's what I meant when I said "rotation and revolution". Rotation can be affected by the ice, whereas revolution *and* ice could be affected by some common external cause.

This is all speculation, of course.

My impression is that the additional rule was actually adopted by
the Greek Orthodox church, and also that for Russia (and I suppose
maybe some others), this is the official calendar. I hope that
everyone will agree on a uniform civil calendar before the
Gregorian and Orthodox calendars get out of synch in 2800.

I wouldn't expect lunar calendars for religious and traditional
uses to be abandoned though.

Regarding ice ages, land in many northern (and southern?) regions
is still rebounding from the last big melt-off, so mass is being
redistributed closer to Earth's axis. I'd expect this "glacial
rebound" to tend to speed up the earth's rotation, opposing tidal
braking's slowing of it. Then too, glaciers at all latitudes seem
to be shrinking currently, which surely has some effect on the
distribution of Earth's mass.

What happens if (when?) the ice caps on Greenland and Antarctica
melt or slide into the ocean? I suppose for one thing, for most
people, whether the vernal equinox falls very near March 21st will
be among the least of their problems.

Of course the distribution of inland water varies, largely due to
human engineering. Ocean and atmospheric currents (and their
portion of the angular momentum) vary, and the distribution of
mass in the oceans and atmosphere varies (El Nino and so on).

I've read that Earth's core rotates at a different rate than its
crust, and the "slippage" probably varies, thus changing the
distribution of angular momentum.

Quite a lot of things affect the distribution of Earth's angular
momentum, and the rotation has to change to conserve total angular
momentum. Well, of course in the case of tidal braking and the
moon moving farther out, it's the angular momentum of the
Earth-Moon system that's being conserved. As it seems difficult to
predict the exact distribution of angular momentum of, it's also
difficult to predict the exact rotation.

But all of the above affects Earth's rotation (its day length),
not it's revolution (year length). They would be relevant for leap
seconds (or occasionally dropping a second) or redefining a second
to make 86400 seconds closer to 1 mean solar day.

To the extent that the average length of a day varies, the number
of such days in a year must vary too.

To affect the revolution, we need something outside of the
Earth-Moon system, such as perturbations from other planets, or
perhaps the solar wind or impact with extra-planetary "dust". My
understanding is that it's perturbation from the major planets
that causes the precession of Earth's perihelion (no, this isn't
the same as the "precession of the equinoxes").

Regards,
James


Quote:
To affect the revolution, we need something outside of the Earth-Moon system, such as perturbations from other planets, or perhaps the solar wind or impact with extra-planetary "dust". My understanding is that it's perturbation from the major planets that causes the precession of Earth's perihelion (no, this isn't the same as the "precession of the equinoxes").

Hence my reference to the Earth's revolution; as we are not certain what causes ice ages, we need to consider the possibility that it is due to something external to the Earth-Moon system.

The 67 program, and the 41 and 42 versions I rewrote, give 366 :-(


Possibly Related Threads...
Thread Author Replies Views Last Post
  HP35s Program Four Slings Lift Calculation Jean-Marc Biram (Australia) 2 262 12-16-2013, 07:21 PM
Last Post: Jean-Marc Biram (Australia)
  Layout of arithmetic keys on early calculators Walter B 10 440 11-20-2013, 11:13 AM
Last Post: Jake Schwartz
  Sheet data importer for HP Prime Marek Russ 4 266 11-15-2013, 04:55 AM
Last Post: debrouxl
  HP Prime: run a program in another program Davi Ribeiro de Oliveira 6 317 11-11-2013, 08:28 PM
Last Post: Davi Ribeiro de Oliveira
  Entering,Saving,and Analysis /Fitting X Y Data on the Prime Harold A Climer 6 339 10-26-2013, 01:54 PM
Last Post: Tim Wessman
  HP PRIME: How to change the column headers and reset data Joseph Ec 5 300 10-18-2013, 02:26 PM
Last Post: Joseph Ec
  HP50G early days vs Prime early days? Mike Powell 7 304 10-09-2013, 11:17 AM
Last Post: Eric Rechlin
  HP Prime data sharing Alberto Candel 5 267 10-06-2013, 07:49 PM
Last Post: Alberto Candel
  [HP-Prime] AMBIGUITY between Numerical Calculation (HOME) and Numerical/Symbolic Calculation (CAS mode) CompSystems 2 176 08-18-2013, 07:06 PM
Last Post: CompSystems
  slow calculation Bill Plaxton 3 204 08-15-2013, 11:57 AM
Last Post: Bill Plaxton

Forum Jump: