Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Calendars
Just curious - has anybody here worked with CoBOL and other calendars?   Any
interesting stories to tell about it?

Report this thread to moderator Post Follow-up to this message
Old Post
Howard Brazee
08-12-04 01:55 PM


Re: Calendars
On  6-Aug-2004, l.willms@jpberlin.de (Lueko Willms) wrote:

>    What do you mean by "other calenders"? I guess not that you think
> COBOL is a calendar, do you? You are rather thinking of the Julian
> calendar, Muslim, Jewish, Maya, Chinese, or other calendars, right?

Yep.   Good thing the Japanese have gone from their calendar based upon the
emperor's reign.

I've seen some discussion about calculating Easter and some similar speciali
zed
calendar needs - but even though the world has standardized on the western
(Christian based) calendar (not to mention 24 hour clock), I can see a need 
for
some shops to default to, say the Muslim calendar.   Maybe it's a moot point
 -
the world calendar dominates for business - and only specialized nooks want
something different.

>    With FUNCTION INTEGER-OF-DATE or INTEGER-OF-DAY you get a fixed day
> number with an epoch of January 1, 1601, Gregorian Calendar.
>
>    Starting with that fixed day number, it is easy to use all
> algorithms presented in the book "Calendrical Calculations" by Edward
> M. Reingold and Nachum Dershowitz, just adding their fixed day number
> R.D. (for Rata Die) which is based on an epoch of an hypothetical
> January 1, 1, extrapolating the Gregorian calendar backwards.

Report this thread to moderator Post Follow-up to this message
Old Post
Howard Brazee
08-12-04 01:55 PM


Re: Calendars
..    Am  06.08.04
schrieb  howard@brazee.net (Howard Brazee)
auf  /COMP/LANG/COBOL
in  cf030e$a16$1@peabody.colorado.edu
ueber  Calendars

HB> Just curious - has anybody here worked with CoBOL and other
HB> calendars?

What do you mean by "other calenders"? I guess not that you think
COBOL is a calendar, do you? You are rather thinking of the Julian
calendar, Muslim, Jewish, Maya, Chinese, or other calendars, right?

With FUNCTION INTEGER-OF-DATE or INTEGER-OF-DAY you get a fixed day
number with an epoch of January 1, 1601, Gregorian Calendar.

Starting with that fixed day number, it is easy to use all
algorithms presented in the book "Calendrical Calculations" by Edward
M. Reingold and Nachum Dershowitz, just adding their fixed day number
R.D. (for Rata Die) which is based on an epoch of an hypothetical
January 1, 1, extrapolating the Gregorian calendar backwards.


But, actual experiences, I have not.


Yours,
Lüko Willms                                     http://www.mlwerke.de
/--------- L.WILLMS@jpberlin.de -- Alle Rechte vorbehalten --

"Die Arbeit in weißer Haut kann sich nicht dort emanzipieren, wo sie
in schwarzer Haut gebrandmarkt wird."     - Karl Marx     12.11.1866

Report this thread to moderator Post Follow-up to this message
Old Post
Lueko Willms
08-12-04 01:55 PM


Re: Calendars
Extrapolating backwards from Gregorian Date January 1, 1601 to Gregorian
Date January 1, 1 is not entirely straightforward.  In the Gregorian
calendar the period October 5, 1582 through October 14, 1582 simply did not
exist, and October 15, 1582 in the Gregorian calendar is October 5, 1582 in
the Julian calendar.

This is complicated by the facts that while the Gregorian calendar was
adopted early in Europe, the Julian calendar prevailed for some time in
England and the USA, and the year changed in England on March 15 in England
and on January 1 elsewhere.  11 February 1672 in England was 21 February
1673 on the Continent; adoption of the Gregorian calendar in England in 1752
led to the omission (by decree) of September 3 through September 13 in that
year.

Then there's also the problem of calculating backwards from a starting
Gregorian date to before the omission of those days in October.  If I
understand this correctly, October 13, 1582 is a valid "Gregorian proleptic"
date.

I'm pretty sure these difficulties contributed to the decisions that
"integer date form" is defined in terms of a *starting* date of 1/1/1601 and
the arguments to the date-of-integer and day-of-integer functions are
required to be *positive* in the 2002 standard.   COBOL's intrinsic
functions aren't designed to support date values from before Gregorian Date
January 1, 1601; you've pretty much got to write your own stuff for
comparison of such dates.

-Chuck Stevens

"Lueko Willms" <l.willms@jpberlin.de> wrote in message
news:9EKpPh29flB@jpberlin-l.willms.jpberlin.de...
> .    Am  06.08.04
> schrieb  howard@brazee.net (Howard Brazee)
>     auf  /COMP/LANG/COBOL
>      in  cf030e$a16$1@peabody.colorado.edu
>   ueber  Calendars
>
> HB> Just curious - has anybody here worked with CoBOL and other
> HB> calendars?
>
>    What do you mean by "other calenders"? I guess not that you think
> COBOL is a calendar, do you? You are rather thinking of the Julian
> calendar, Muslim, Jewish, Maya, Chinese, or other calendars, right?
>
>    With FUNCTION INTEGER-OF-DATE or INTEGER-OF-DAY you get a fixed day
> number with an epoch of January 1, 1601, Gregorian Calendar.
>
>    Starting with that fixed day number, it is easy to use all
> algorithms presented in the book "Calendrical Calculations" by Edward
> M. Reingold and Nachum Dershowitz, just adding their fixed day number
> R.D. (for Rata Die) which is based on an epoch of an hypothetical
> January 1, 1, extrapolating the Gregorian calendar backwards.
>
>
>    But, actual experiences, I have not.
>
>
> Yours,
> Lüko Willms                                     http://www.mlwerke.de
> /--------- L.WILLMS@jpberlin.de -- Alle Rechte vorbehalten --
>
> "Die Arbeit in weißer Haut kann sich nicht dort emanzipieren, wo sie
> in schwarzer Haut gebrandmarkt wird."     - Karl Marx     12.11.1866



Report this thread to moderator Post Follow-up to this message
Old Post
Chuck Stevens
08-12-04 01:55 PM


Re: Calendars
ISO 8601 doesn't seem to specify anything about "other calendars", but
ISO/IEC 9945-2 apparently does, and t_fmt and d_fmt as they relate to
locale-dates from that standard are explicitly accounted for in the current
COBOL standard (ISO/IEC 1989:2002 pages 64-65, 8.2, Locales).

Stated a different way, I haven't personally worked with "other calendars",
but the mechanisms are certainly there in standard COBOL to do so.

-Chuck Stevens

"Howard Brazee" <howard@brazee.net> wrote in message
news:cf030e$a16$1@peabody.colorado.edu...
> Just curious - has anybody here worked with CoBOL and other calendars?
Any
> interesting stories to tell about it?



Report this thread to moderator Post Follow-up to this message
Old Post
Chuck Stevens
08-13-04 08:55 PM


Re: Calendars
In article <10h871i62mdur18@corp.supernews.com>,
Walter Murray <wmurray@midtown.net> wrote:
><docdwarf@panix.com> wrote: 
>1752 
>that 
>
>Indeed!  Consider the plight of the common laborer in England.  He was paid
>by the day, but his landlord expected a full month's rent for September.
>The disruption would ripple through the whole economy.  The act that
>mandated the change from Old Style to New Style dates tried to address a lo
t
>of these things, but there were still inequities.

Consider the plight of the Olde-Tyme grammar-school student in the United
States of America.  It was easy to remember that George Washington was
born in the year of (square root of three) times 1000... but was it
February 11 or February 22?

>
>The really weird thing, to me, was that New Year's Day used to come on Marc
h
>25.  So, for example, using the old calendar, the day after March 24, 1720,
>was March 25, 1721.  That would add an extra little twist to a date
>calculation routine, wouldn't it?!

I recall, decades back, reading a collection of short stories by Keith
Laumer about interrestrial relations which featured a character named
Jamie Retief.  In one tale there was an attempt to extort something from
the diplomatic corps under the guise that it was a local holiday, 'Double
Gift Tuesday'.  When Retief pointed out that the local
leader/priest/general had mentioned that yesterday was 'double-gift
Tuesday' the creature flustered/blustered/sputtered 'Calendar Reform! Long
overdue, now is a *w* of double-gift Tuesdays!'

Now in our days of Modern Time it seems as though there's a pretty good
grip on the relationship folks would like to see between the Heavenly Bowl
above and the pieces of paper torn of a series of one-panel cartoons
below; there hasn't been a calendar 'crisis' in a goodly long while... I
try to keep the memory of such things alive, though, by conversations
like:

'Well... it's Monday again.'

'Aye, happens every w around this time, too... and a Good Thing it is,
or else I'd have to rewrite all my date routines.'

DD


Report this thread to moderator Post Follow-up to this message
Old Post
docdwarf@panix.com
08-14-04 08:55 AM


Re: Calendars
"Richard" <riplin@Azonic.co.nz> wrote in message
news:217e491a.0408102245.3099f602@posting.google.com...

> The carolling tradition, which is of pagan origin, lived on up to this
> century. Especially in the south-western parts of Finland, the songs
> performed by carolling young men included Tapanin virsi. The song
> remained part of the Boxing Day (Feast of St Stephen) ceremony: young
> men went from house to house, one dressed as Tapani in a straw suit,
> others as Christmas bears, billy goats or cranes. They sang and danced
> Tapanin virsi, ending with a request for beer and food for their own
> feast.

Interesting point.  The earliest historical date I can find for Finland is
the first Finnish crue in 1155, and one of the leaders of this Crue
was an English bishop named Henry, later apparently canonized and made the
patron saint of Finland (his companion Erik is the patron saint of Sweden).
Henry was killed in 1156, so it's unlikely he took the custom back to
England from Finland, and if he was bent on *Christianizing* Finland he
would hardly be likely to *introduce* fundamentally pagan practices.

The Scandinavians that seemed to "intermix" with the English during the Dark
Ages seemed to be speakers of Germanic languages, whereas what we now know
as south-west Finland spoke a member of the Finno-Ugric group, which isn't
even part of the Indo-European family.

Did this custom evolve *entirely* independently in Finland and England, or
was it borrowed by one from the other, and if the latter, in which
direction?

Stated a different way, is there *a* caroling tradition, or are there
*multiple* caroling traditions that happen to resemble each other?

-Chuck Stevens



Report this thread to moderator Post Follow-up to this message
Old Post
Chuck Stevens
08-15-04 01:55 AM


Re: Calendars
On  9-Aug-2004, robert.deletethis@wagner.net (Robert Wagner) wrote:

> The enlightened Saudi Arabia is an exception. Since 1999 it has used the
> calculated position of the moon rather than relying on observation. In oth
er
> Gulf countries, it's not possible to print next year's, or even next month
's,
> calendar in advance.

A few years ago, Saudi Arabia set their clocks by the sun, instead of using 
an
offset of Zulu time.   Is that still the case?

Report this thread to moderator Post Follow-up to this message
Old Post
Howard Brazee
08-15-04 08:55 AM


Re: Calendars
<docdwarf@panix.com> wrote in message news:cf2i88$cbk$1@panix5.panix.com...

> Now in our days of Modern Time it seems as though there's a pretty good
> grip on the relationship folks would like to see between the Heavenly Bowl
> above and the pieces of paper torn of a series of one-panel cartoons
> below; there hasn't been a calendar 'crisis' in a goodly long while...

Ahh.  You missed all the discussions at J4 about what happens in the new
time-conversion functions when the leap-second directive with the ON phrase
is in effect, and whether UCT was 23:59:60 or 00:00:00 (or, for that matter,
24:00:00) when it was 01:00:00 in Paris.  And then there's the whole
offset-from-UCT contoversy, in which the local governments decide the offset
(all of China, for example, is in the same time zone) and any local despot
is free to decide what local time should be!

- Chuck Stevens



Report this thread to moderator Post Follow-up to this message
Old Post
Chuck Stevens
08-15-04 08:55 AM


Re: Calendars
Robert Wagner write:

<< ... The Russian Orthodox Church still uses Julian, which explains why
Christmas in Russia is celebrated on Jan 7. ... >>

According to articles I've read -- I don't offhand remember whether it was
in Bible Review or Biblical Archaeology Review -- there is strong evidence
that the tradition of Christmas as January 7 significantly predates the
calendar shift (and perhaps even the Great Eastern Schism itself).

And I believe this tradition is common, and perhaps even conventional,
throughout the Orthodox Communion, not limited merely to the Autocephalous
Church of Russia.

-Chuck Stevens



Report this thread to moderator Post Follow-up to this message
Old Post
Chuck Stevens
08-15-04 08:55 AM


Sponsored Links




Last Thread Next Thread Next
Pages (3): [1] 2 3 »
Search this forum -> 
Post New Thread

Cobol archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 01:57 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.