🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.basic.misc
2 messages
2 total messages Started by Ian Staples Sat, 24 Feb 1996 00:00
What's the day of the week?
#99
Author: Ian Staples
Date: Sat, 24 Feb 1996 00:00
57 lines
2864 bytes
From time to time one sees questions about programs to turn dates 
into days elapsed, days of the week, etc.  For those who are
inclined to develop a "generic" program to do this sort of thing
over a long period of time, here are a few complications to
consider (Ref: The New Encyclopaedia Britannica 15th Edition 1983):

In the 16th Century, Pope Gregory XIII introduced the so-called
Gregorian calendar to replace the earlier Julian calendar.  The
purpose was to recalibrate to calendar year with the celestial
year so that the vernal equinox would once again fall on 21 March
as it had at the time of the Council of Nicaea in AD 325.  The
major effect was the "loss" of 11 days in October 1582 -- it was
proclaimed that the day following 4 Oct 1582 would be 15 Oct 1582.
And, apart from some rioting in the streets and similar statements
of concern by the great unwashed at the "loss" of 11 days from 
their lives, this change was put into effect.

Unfortunately, the wider world didn't immediately fall into line
with this papist decree.  In fact, some delayed their response by
a Century or two.  The introduction of this geopolitical variation
will further complicate attempts at "generic" programming of dates.

For those who still harbour such ambitions the following data may
be helpful:

Year of transition to the Gregorian calendar:

1582	Italian states, Portugal, Spain
1583	Catholic German states
1699	Protestant German states
1752	England and colonies
1753	Sweden
1873	Japan
1912	China
1918	Soviet Union
1923	Greece

Apart from dropping a few days, the Gregorian calendar only differs
from the Julian in that no century year is a leap year unless exactly
divisible by 400 (i.e. the year 2000 will be a leap year).

A further refinement, years evenly divisible by 4000 are NOT leap
years, will keep it accurate to within 1 day in 20,000 years.

Oh, and don't forget that Muslim countries tend to retain calendars
based on Islam.  :-)


Cheers, and may your algorithms be concise,

Ian S.

-- 

Ian Staples                        E-mail : I.Staples@dpi.qld.gov.au
c/- P.O. Box 1054 MAREEBA          Phone  : +61 (0)70 928 555 Home 924 847
Queensland Australia 4880            Fax  : +61 (0)70 923 593   "   "   "
Re: What's the day of the week?
#98
Author: leon garde
Date: Mon, 26 Feb 1996 00:00
57 lines
3282 bytes
In <DnA5v0.1tJ@planet.mh.dpi.qld.gov.au> staplei@planet.mh.dpi.qld.gov.au (Ian Staples) writes:

>From time to time one sees questions about programs to turn dates 
>into days elapsed, days of the week, etc.  For those who are
>inclined to develop a "generic" program to do this sort of thing
>over a long period of time, here are a few complications to
>consider (Ref: The New Encyclopaedia Britannica 15th Edition 1983):

>In the 16th Century, Pope Gregory XIII introduced the so-called
>Gregorian calendar to replace the earlier Julian calendar.  The
>purpose was to recalibrate to calendar year with the celestial
>year so that the vernal equinox would once again fall on 21 March
>as it had at the time of the Council of Nicaea in AD 325.  The
>major effect was the "loss" of 11 days in October 1582 -- it was
>proclaimed that the day following 4 Oct 1582 would be 15 Oct 1582.
>And, apart from some rioting in the streets and similar statements
>of concern by the great unwashed at the "loss" of 11 days from 
>their lives, this change was put into effect.

>Unfortunately, the wider world didn't immediately fall into line
>with this papist decree.  In fact, some delayed their response by

well, perhaps, that would be better said
'unfortunately, the wider world did cave in to this papal decree,
after a 4 century battle to not give up 11 days.'.

it was difficult one off thing to take.
in hindsight, science says that dropping the 11 days was futile
as the vernal equinox will still  change one day every 75 years,
taking 25800 years to get back to march 21 .
this stems from the fact that our years are determined by our position
on earth's orbit and not on the seasons and the equinoxes.
seasons and equinoxes are caused by the tilt of the earth.

if years were determined by seasons and equinoxes, then
the calculating orbits of the earth and that becomes much more complicated.







and if people want to get more accurate and try to translate the time of day
too ,  there are other problems, considering changing time zones and
daylight savings and all.
eg. until a few ago, the soviet union operating in a time zone all of its
own.  the soviet union standardised its date and time in 1918,
except it had all of the lands  operating in the standard time zone for Moscow.
but late one summer ,  stalin forgot to decree the end to daylight savings....
(this was during world war II, so maybe there was a reason to the madness ? )

Moscow now runs in the timezone that its longitude suggests.
Those  pre programmed 'multi-time watches' popular in the worst of
the digital watch  era now get Moscow wrong..

leon
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads