all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* The Emacs Calculator and calendar
@ 2012-10-05 19:13 Jay Belanger
  2012-10-05 19:24 ` Paul Eggert
                   ` (2 more replies)
  0 siblings, 3 replies; 47+ messages in thread
From: Jay Belanger @ 2012-10-05 19:13 UTC (permalink / raw
  To: emacs-devel; +Cc: jay.p.belanger


Calc and the Emacs calendar use different calendar systems.
From the Calc manual:
  Calc uses a combination of the Gregorian and Julian calendars,
  following the history of Great Britain and the British colonies.
  This is the same calendar that is used by the `cal' program in most
  Unix implementations. 
and from the Emacs manual:
  The Emacs calendar displayed is _always_ the Gregorian calendar,
  sometimes called the "new style" calendar, which is used in most of the
  world today.  However, this calendar did not exist before the sixteenth
  century and was not widely used before the eighteenth century; it did
  not fully displace the Julian calendar and gain universal acceptance
  until the early twentieth century.  The Emacs calendar can display any
  month since January, year 1 of the current era, but the calendar
  displayed is always the Gregorian, even for a date at which the
  Gregorian calendar did not exist.
So, for example, the day before September 14, 1752 is 
September 2, 1752 according to Calc and September 13, 1752 according
to the calendar.

Is this acceptable, or should they be made consistent?

Jay



^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-05 19:13 The Emacs Calculator and calendar Jay Belanger
@ 2012-10-05 19:24 ` Paul Eggert
  2012-10-05 20:51 ` Edward Reingold
  2012-10-05 21:17 ` Edward Reingold
  2 siblings, 0 replies; 47+ messages in thread
From: Paul Eggert @ 2012-10-05 19:24 UTC (permalink / raw
  To: jay.p.belanger; +Cc: emacs-devel

On 10/05/2012 12:13 PM, Jay Belanger wrote:
> should they be made consistent

It'd be nicer if they were consistent, though it's not crucial.

The calendar code is the way to go.  It is applicable world-wide,
whereas the Calc way of doing things works only in territory
that was under British control in 1752.



^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-05 19:13 The Emacs Calculator and calendar Jay Belanger
  2012-10-05 19:24 ` Paul Eggert
@ 2012-10-05 20:51 ` Edward Reingold
  2012-10-05 21:14   ` Pascal J. Bourguignon
  2012-10-06 15:41   ` Richard Stallman
  2012-10-05 21:17 ` Edward Reingold
  2 siblings, 2 replies; 47+ messages in thread
From: Edward Reingold @ 2012-10-05 20:51 UTC (permalink / raw
  To: jay.p.belanger; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1503 bytes --]

I would say it even more strongly: the Unix cal and the Emacs calc are
foolish chimeras; there
were hundreds of different dates of adoption of the Gregorian calendar,
stretching almost 400 years.
Emacs calendar does the only sane thing.

On Fri, Oct 5, 2012 at 2:13 PM, Jay Belanger <jay.p.belanger@gmail.com>wrote:

>
> Calc and the Emacs calendar use different calendar systems.
> From the Calc manual:
>   Calc uses a combination of the Gregorian and Julian calendars,
>   following the history of Great Britain and the British colonies.
>   This is the same calendar that is used by the `cal' program in most
>   Unix implementations.
> and from the Emacs manual:
>   The Emacs calendar displayed is _always_ the Gregorian calendar,
>   sometimes called the "new style" calendar, which is used in most of the
>   world today.  However, this calendar did not exist before the sixteenth
>   century and was not widely used before the eighteenth century; it did
>   not fully displace the Julian calendar and gain universal acceptance
>   until the early twentieth century.  The Emacs calendar can display any
>   month since January, year 1 of the current era, but the calendar
>   displayed is always the Gregorian, even for a date at which the
>   Gregorian calendar did not exist.
> So, for example, the day before September 14, 1752 is
> September 2, 1752 according to Calc and September 13, 1752 according
> to the calendar.
>
> Is this acceptable, or should they be made consistent?
>
> Jay
>
>

[-- Attachment #2: Type: text/html, Size: 1917 bytes --]

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-05 20:51 ` Edward Reingold
@ 2012-10-05 21:14   ` Pascal J. Bourguignon
  2012-10-06 15:41   ` Richard Stallman
  1 sibling, 0 replies; 47+ messages in thread
From: Pascal J. Bourguignon @ 2012-10-05 21:14 UTC (permalink / raw
  To: emacs-devel

Edward Reingold <reingold@iit.edu> writes:

>
> On Fri, Oct 5, 2012 at 2:13 PM, Jay Belanger <jay.p.belanger@gmail.com> wrote:
>
>     So, for example, the day before September 14, 1752 is
>     September 2, 1752 according to Calc and September 13, 1752 according
>     to the calendar.
>    
>     Is this acceptable, or should they be made consistent?
>
> I would say it even more strongly: the Unix cal and the Emacs calc are
> foolish chimeras; there were hundreds of different dates of adoption
> of the Gregorian calendar, stretching almost 400 years.  Emacs
> calendar does the only sane thing.

Indeed, it's perfectly acceptable, and probably preferable to just give
the Gregorian dates.

If you want to be more exact, you need not only to specify a calendar
from the date and location (including the planet), but also political or
religious power you're abiding to, and even with that, we lack a lot of
information given that a lot of calendars were relative (to the reign of
the current monarch, or the foundation of the local city), and that we
may not have all the information needed to synchronize them.

What would be the birth date of Cochise's great great great grand
father?  I mean, assuming you know how many seconds ago he was born, it
was before the Americas went under the political power of European
countries.  Each tribe had its own moon names, I don't know if they even
had absolute year counters.

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
A bad day in () is better than a good day in {}.




^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-05 19:13 The Emacs Calculator and calendar Jay Belanger
  2012-10-05 19:24 ` Paul Eggert
  2012-10-05 20:51 ` Edward Reingold
@ 2012-10-05 21:17 ` Edward Reingold
  2 siblings, 0 replies; 47+ messages in thread
From: Edward Reingold @ 2012-10-05 21:17 UTC (permalink / raw
  To: jay.p.belanger; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1353 bytes --]

Of course, the Julian calendar is available in Emacs, as are the Hebrew,
Chinese, etc.

On Fri, Oct 5, 2012 at 2:13 PM, Jay Belanger <jay.p.belanger@gmail.com>wrote:

>
> Calc and the Emacs calendar use different calendar systems.
> From the Calc manual:
>   Calc uses a combination of the Gregorian and Julian calendars,
>   following the history of Great Britain and the British colonies.
>   This is the same calendar that is used by the `cal' program in most
>   Unix implementations.
> and from the Emacs manual:
>   The Emacs calendar displayed is _always_ the Gregorian calendar,
>   sometimes called the "new style" calendar, which is used in most of the
>   world today.  However, this calendar did not exist before the sixteenth
>   century and was not widely used before the eighteenth century; it did
>   not fully displace the Julian calendar and gain universal acceptance
>   until the early twentieth century.  The Emacs calendar can display any
>   month since January, year 1 of the current era, but the calendar
>   displayed is always the Gregorian, even for a date at which the
>   Gregorian calendar did not exist.
> So, for example, the day before September 14, 1752 is
> September 2, 1752 according to Calc and September 13, 1752 according
> to the calendar.
>
> Is this acceptable, or should they be made consistent?
>
> Jay
>
>

[-- Attachment #2: Type: text/html, Size: 1757 bytes --]

^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-05 20:51 ` Edward Reingold
  2012-10-05 21:14   ` Pascal J. Bourguignon
@ 2012-10-06 15:41   ` Richard Stallman
  2012-10-06 22:07     ` Paul Eggert
  2012-10-07  7:56     ` Achim Gratz
  1 sibling, 2 replies; 47+ messages in thread
From: Richard Stallman @ 2012-10-06 15:41 UTC (permalink / raw
  To: Edward Reingold; +Cc: jay.p.belanger, emacs-devel

    I would say it even more strongly: the Unix cal and the Emacs calc are
    foolish chimeras; there
    were hundreds of different dates of adoption of the Gregorian calendar,
    stretching almost 400 years.
    Emacs calendar does the only sane thing.

I am not convinced.  Nobody used the Gregorian calendar in 1400,
so displaying dates from that year in Gregorian is an anachronism.

Perhaps a calendar program should allow the user to specify changeover
date, offering convenient options for the main jurisdictions of interest.
The Vatican would be one option, England would be another, etc.


-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call




^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-06 15:41   ` Richard Stallman
@ 2012-10-06 22:07     ` Paul Eggert
  2012-10-07  3:49       ` Richard Stallman
                         ` (2 more replies)
  2012-10-07  7:56     ` Achim Gratz
  1 sibling, 3 replies; 47+ messages in thread
From: Paul Eggert @ 2012-10-06 22:07 UTC (permalink / raw
  To: rms; +Cc: jay.p.belanger, Edward Reingold, emacs-devel

On 10/06/2012 08:41 AM, Richard Stallman wrote:

> Nobody used the Gregorian calendar in 1400,
> so displaying dates from that year in Gregorian is an anachronism.

It's OK and common to use an anachronism.  It is standard
practice to use modern calendars when talking about old dates.
Almost nobody who writes about ancient history specifies dates in the
calendars that were used at the time.  Instead, people typically use a
more-modern calendar, and write things like "Caesar was assassinated
in 44 BC" or "Wu became emperor of all China in 280".

It's true that it's also common practice to use the Julian calendar
when talking about events that occurred before 1752 in British-contolled
territory, and to use the Gregorian calendar for later events in that
territory.  But this is a special case, and it does not generalize well
elsewhere.

> Perhaps a calendar program should allow the user to specify changeover
> date, offering convenient options for the main jurisdictions of interest.

Unfortunately there are thousands of jurisdictions, and
there is no systematic database of this stuff that I know of.
Some places switched back and forth several times, and the
switchover dates are not always known.  In some locations,
both calendars were used simultaneously, and whether
you used Julian or Gregorian dates depended on what reason
you wanted the dates.  (A few places *still* use Julian
for some official purposes.)  And things get even more
complicated once one considers all the other calendars that are
or have been in practical use.  So I'm afraid this suggestion,
though appealing in principle, is not practical.




^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-06 22:07     ` Paul Eggert
@ 2012-10-07  3:49       ` Richard Stallman
  2012-10-07  6:22         ` Paul Eggert
  2012-10-07  6:36       ` Eli Zaretskii
  2012-10-07  8:17       ` Stephen J. Turnbull
  2 siblings, 1 reply; 47+ messages in thread
From: Richard Stallman @ 2012-10-07  3:49 UTC (permalink / raw
  To: Paul Eggert; +Cc: jay.p.belanger, reingold, emacs-devel

    Almost nobody who writes about ancient history specifies dates in the
    calendars that were used at the time.  Instead, people typically use a
    more-modern calendar, and write things like "Caesar was assassinated
    in 44 BC" or "Wu became emperor of all China in 280".

China used neither the Julian calendar nor the Gregorian calendar then,
so there is no argument in favor of using the Julian calendar rather than
the Gregorian calendar when talking about dates in ancient China.

However, all of Europe used the Julian calendar for hundreds of years.
That is where the issue arises most strongly.

Jan 5, 1000 in the Gregorian calendar was Dec 31, 999 in the Julian calendar.
If something happened in Europe on that day, which year do modern historians
say it occured in?  Is there a convention for which calendar should be used
when describing those dates?

    It's true that it's also common practice to use the Julian calendar
    when talking about events that occurred before 1752 in British-contolled
    territory, and to use the Gregorian calendar for later events in that
    territory.  But this is a special case, and it does not generalize well
    elsewhere.

This special case is rather important -- it includes what shortly
thereafter became the US.  I think that is enough reason to support it
as an option.

-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call




^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-07  3:49       ` Richard Stallman
@ 2012-10-07  6:22         ` Paul Eggert
  2012-10-07 17:30           ` Richard Stallman
  0 siblings, 1 reply; 47+ messages in thread
From: Paul Eggert @ 2012-10-07  6:22 UTC (permalink / raw
  To: rms; +Cc: jay.p.belanger, reingold, emacs-devel

On 10/06/2012 08:49 PM, Richard Stallman wrote:

> all of Europe used the Julian calendar for hundreds of years.

Unfortunately that's not correct, if by "Julian calendar"
one means the Julian calendar that Emacs implements.  (In
this email I'll call it the "Emacs Julian calendar", to
clearly distinguish it from the many other Julian calendars.)

For example, England never used the Emacs Julian calendar:
before 1752, English years started on March 25, and after
1752 England used Gregorian.  The Holy Roman Empire used the
Emacs Julian calendar for only four decades, from 1544 to
1582.  Other European countries used the Emacs Julian
calendar for a bit longer in some cases, but off the top of
my head I can think of only one country that actually used
the Emacs Julian calendar for hundreds of years, namely
Russia from 1700 through 1918.

> Jan 5, 1000 in the Gregorian calendar was Dec 31, 999
> in the Julian calendar.

It's true that nobody called it "Jan 5, 1000" back then,
because the Gregorian calendar wasn't invented yet.  But
it's also true that very few people called it "December 31,
999" back then, because the Emacs-style Julian calendar was
pretty rare, perhaps even nonexistent, back then.  So both
calendars are being used proleptically (i.e., extrapolating
them backward into the past) if we are talking about that
date.

> If something happened in Europe on that day, which year
> do modern historians say it occurred in?

Most modern European historians would probably say 999.
But for the date 30 days later, some would say 999,
others 1000, and still others 999/1000.

Old dates are a real mess.  This may help to explain why Ed
Reingold worded his advice so strongly.  The method of Unix
cal and Emacs calc looks cute, but it's incorrect in the
sense that it doesn't correspond to any actual historical
practice, so it arguably causes more harm (by confusing
users) than it cures.  The method of Emacs calendar is much
saner.




^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-06 22:07     ` Paul Eggert
  2012-10-07  3:49       ` Richard Stallman
@ 2012-10-07  6:36       ` Eli Zaretskii
  2012-10-07  7:50         ` Paul Eggert
  2012-10-07 21:55         ` Sam Steingold
  2012-10-07  8:17       ` Stephen J. Turnbull
  2 siblings, 2 replies; 47+ messages in thread
From: Eli Zaretskii @ 2012-10-07  6:36 UTC (permalink / raw
  To: Paul Eggert; +Cc: jay.p.belanger, reingold, rms, emacs-devel

> Date: Sat, 06 Oct 2012 15:07:05 -0700
> From: Paul Eggert <eggert@cs.ucla.edu>
> Cc: jay.p.belanger@gmail.com, Edward Reingold <reingold@iit.edu>,
> 	emacs-devel@gnu.org
> 
> Almost nobody who writes about ancient history specifies dates in the
> calendars that were used at the time.

Maybe in English-speaking countries.  Try reading Russian history
books, and you will see old dates right up to 1918.  That's why it's
called "the October Revolution", although it happened on Nov 7th.  To
this day, Jan 14 is "the Old New Year day" for many people in Russia
and other countries.  The Russian Church is still using the Julian
calendar, according to http://en.wikipedia.org/wiki/Old_New_Year.  So
much for "almost nobody".

> It's true that it's also common practice to use the Julian calendar
> when talking about events that occurred before 1752 in British-contolled
> territory, and to use the Gregorian calendar for later events in that
> territory.  But this is a special case, and it does not generalize well
> elsewhere.

See above.  There are other special cases, some generalization is
possible.




^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-07  6:36       ` Eli Zaretskii
@ 2012-10-07  7:50         ` Paul Eggert
  2012-10-07  8:45           ` Eli Zaretskii
  2012-10-07 17:30           ` Richard Stallman
  2012-10-07 21:55         ` Sam Steingold
  1 sibling, 2 replies; 47+ messages in thread
From: Paul Eggert @ 2012-10-07  7:50 UTC (permalink / raw
  To: Eli Zaretskii; +Cc: jay.p.belanger, reingold, rms, emacs-devel

On 10/06/2012 11:36 PM, Eli Zaretskii wrote:
>> Date: Sat, 06 Oct 2012 15:07:05 -0700
>> From: Paul Eggert <eggert@cs.ucla.edu>
>>
>> Almost nobody who writes about ancient history specifies dates in the
>> calendars that were used at the time.
> 
> Maybe in English-speaking countries.  Try reading Russian history
> books, and you will see old dates right up to 1918.

I was talking about ancient history, which ended
circa 500.  When Russians write about ancient history,
they typically don't use the same calendars that the
ancients did.  They may use the old (1700-1918) Russian
calendar, but that's not the same thing.

> There are other special cases, some generalization is
> possible.

In theory yes, but it's not practical.
There are too many special cases.  And too many
of these special cases are undocumented: we simply
don't know which calendar was used when and where.

For example, modern historians who write about Caesar's death
usually write in terms of the Julian calendar in effect at the
time.  But this differs from Julian calendar that Emacs
implements.  Caesar was killed on March 15 in the Julian
calendar of the time, and this is probably (though not
certainly) March 14 of the Emacs Julian calendar.  (I write
"not certainly" because some of the details of the old
Julian calendar were lost and have not been reconstructed to
everybody's satisfaction.)




^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-06 15:41   ` Richard Stallman
  2012-10-06 22:07     ` Paul Eggert
@ 2012-10-07  7:56     ` Achim Gratz
  2012-10-07  8:44       ` Eli Zaretskii
  1 sibling, 1 reply; 47+ messages in thread
From: Achim Gratz @ 2012-10-07  7:56 UTC (permalink / raw
  To: emacs-devel

Richard Stallman writes:
>     I would say it even more strongly: the Unix cal and the Emacs calc are
>     foolish chimeras; there
>     were hundreds of different dates of adoption of the Gregorian calendar,
>     stretching almost 400 years.
>     Emacs calendar does the only sane thing.
>
> I am not convinced.  Nobody used the Gregorian calendar in 1400,
> so displaying dates from that year in Gregorian is an anachronism.

That argument doesn't have legs to stand on, IMHO.  A user of Emacs
asking for a date that far back can only make sense of it from the
current frame of reference.  If it matters what calendar (if any
calendar at all, really) that hypothetical somebody back then would have
used then there's a lot more work to do to find a suitable calendar than
simply saying that our current calendar didn't exist back then.  Picking
a random calendar that did exist somewhere at that time isn't going to
cut it.  So the only sane default is still _our_ calendar.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Samples for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldSamplesExtra




^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-06 22:07     ` Paul Eggert
  2012-10-07  3:49       ` Richard Stallman
  2012-10-07  6:36       ` Eli Zaretskii
@ 2012-10-07  8:17       ` Stephen J. Turnbull
  2 siblings, 0 replies; 47+ messages in thread
From: Stephen J. Turnbull @ 2012-10-07  8:17 UTC (permalink / raw
  To: Paul Eggert; +Cc: jay.p.belanger, Edward Reingold, rms, emacs-devel

Paul Eggert writes:

 > > Perhaps a calendar program should allow the user to specify changeover
 > > date, offering convenient options for the main jurisdictions of interest.
 > 
 > So I'm afraid this suggestion, though appealing in principle, is
 > not practical.

I'd put it a little differently.  While it's practical (ie, do-able in
pieces, and useful to some people), it doesn't provide a general
solution to the problem of specifying old dates.




^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-07  7:56     ` Achim Gratz
@ 2012-10-07  8:44       ` Eli Zaretskii
  2012-10-07 13:57         ` Stefan Monnier
  0 siblings, 1 reply; 47+ messages in thread
From: Eli Zaretskii @ 2012-10-07  8:44 UTC (permalink / raw
  To: Achim Gratz; +Cc: emacs-devel

> From: Achim Gratz <Stromeko@nexgo.de>
> Date: Sun, 07 Oct 2012 09:56:52 +0200
> 
> Richard Stallman writes:
> >     I would say it even more strongly: the Unix cal and the Emacs calc are
> >     foolish chimeras; there
> >     were hundreds of different dates of adoption of the Gregorian calendar,
> >     stretching almost 400 years.
> >     Emacs calendar does the only sane thing.
> >
> > I am not convinced.  Nobody used the Gregorian calendar in 1400,
> > so displaying dates from that year in Gregorian is an anachronism.
> 
> That argument doesn't have legs to stand on, IMHO.  A user of Emacs
> asking for a date that far back can only make sense of it from the
> current frame of reference.

You are second-guessing users' motives.  Is it so unreasonable to ask
for an old date because one is reading a book that uses the calendar
from those old days?



^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-07  7:50         ` Paul Eggert
@ 2012-10-07  8:45           ` Eli Zaretskii
  2012-10-07 13:01             ` Juanma Barranquero
  2012-10-07 17:30           ` Richard Stallman
  1 sibling, 1 reply; 47+ messages in thread
From: Eli Zaretskii @ 2012-10-07  8:45 UTC (permalink / raw
  To: Paul Eggert; +Cc: jay.p.belanger, reingold, rms, emacs-devel

> Date: Sun, 07 Oct 2012 00:50:33 -0700
> From: Paul Eggert <eggert@cs.ucla.edu>
> CC: rms@gnu.org, jay.p.belanger@gmail.com, reingold@iit.edu, 
>  emacs-devel@gnu.org
> 
> On 10/06/2012 11:36 PM, Eli Zaretskii wrote:
> >> Date: Sat, 06 Oct 2012 15:07:05 -0700
> >> From: Paul Eggert <eggert@cs.ucla.edu>
> >>
> >> Almost nobody who writes about ancient history specifies dates in the
> >> calendars that were used at the time.
> > 
> > Maybe in English-speaking countries.  Try reading Russian history
> > books, and you will see old dates right up to 1918.
> 
> I was talking about ancient history, which ended
> circa 500.

Maybe you were talking about that limit, but the discussion clearly
referred to dates up to 1752.



^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-07  8:45           ` Eli Zaretskii
@ 2012-10-07 13:01             ` Juanma Barranquero
  2012-10-07 14:08               ` Eli Zaretskii
  0 siblings, 1 reply; 47+ messages in thread
From: Juanma Barranquero @ 2012-10-07 13:01 UTC (permalink / raw
  To: Eli Zaretskii; +Cc: jay.p.belanger, Paul Eggert, reingold, rms, emacs-devel

On Sun, Oct 7, 2012 at 10:45 AM, Eli Zaretskii <eliz@gnu.org> wrote:

> Maybe you were talking about that limit, but the discussion clearly
> referred to dates up to 1752.

Is really "ancient history" a common term to refer to history a couple
of centuries back?

Also, why 1752? If we're talking about non-English-speaking countries,
the Gregorian calendar was adopted by Spain, Portugal, Italy and
Poland in 1582.

Anyway, count me in Paul's side on this. References to past calendars
in "contemporary" style are a deep pit of vagueness and
misunderstandings. It's common to see ancient Roman dates as AUC ("ab
urbe condita", from the founding of the city), a calendar which the
Romans didn't use, or only very occasionally. And we talk of year 10
or 20 or 100 AC (Julian or Gregorian) but no one at the time would
have understood that, It's a system devised in the 6th century and
used mainly from 9th on.

It makes a bit more sense to use Julian to refer to post-medieval
dates, but even in this case, conversion is not automatic unless you
specify the place. If you're reading a Russian book using the Julian
calendar, it's simpler to know that there is a 13 days difference with
the current reckoning that to use a program to convert dates back and
forth, don't you think?

My 2/86400 of solar day,

    Juanma



^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-07  8:44       ` Eli Zaretskii
@ 2012-10-07 13:57         ` Stefan Monnier
  2012-10-07 20:32           ` Paul Eggert
  0 siblings, 1 reply; 47+ messages in thread
From: Stefan Monnier @ 2012-10-07 13:57 UTC (permalink / raw
  To: Eli Zaretskii; +Cc: Achim Gratz, emacs-devel

> You are second-guessing users' motives.  Is it so unreasonable to ask
> for an old date because one is reading a book that uses the calendar
> from those old days?

No, all it means is that for such old dates, Emacs can't know which
calendar the user meant to use unless the user says it explicitly.
So it makes a lot of sense to use a default that is simple and
consistent (i.e. always use the same calendar, namely the Gregorian) and
let the user specify which calendar she wants if she wants another one.

To the extent possible, Emacs could let the user specify the calendar
indirectly by instead specifying a "context" (a place, plus whatever
else is needed to resolve ambiguities), and then let Emacs figure out
which calendar was used at that time in that context.


        Stefan



^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-07 13:01             ` Juanma Barranquero
@ 2012-10-07 14:08               ` Eli Zaretskii
  0 siblings, 0 replies; 47+ messages in thread
From: Eli Zaretskii @ 2012-10-07 14:08 UTC (permalink / raw
  To: Juanma Barranquero; +Cc: jay.p.belanger, eggert, reingold, rms, emacs-devel

> From: Juanma Barranquero <lekktu@gmail.com>
> Date: Sun, 7 Oct 2012 15:01:09 +0200
> Cc: Paul Eggert <eggert@cs.ucla.edu>, jay.p.belanger@gmail.com, reingold@iit.edu, 
> 	rms@gnu.org, emacs-devel@gnu.org
> 
> It makes a bit more sense to use Julian to refer to post-medieval
> dates, but even in this case, conversion is not automatic unless you
> specify the place. If you're reading a Russian book using the Julian
> calendar, it's simpler to know that there is a 13 days difference with
> the current reckoning that to use a program to convert dates back and
> forth, don't you think?

I have no opinion about what the different calendar applications
should do.  But this discussion went beyond that narrow issue.  And I
just wanted to point out that assertions like "Almost nobody who
writes about ancient history specifies dates in the calendars that
were used at the time" and "using the Julian calendar when talking
about events that occurred before 1752 ... is a special case that
doesn't generalize" don't seem to be supported by facts.



^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-07  6:22         ` Paul Eggert
@ 2012-10-07 17:30           ` Richard Stallman
  2012-10-07 18:23             ` Paul Eggert
  0 siblings, 1 reply; 47+ messages in thread
From: Richard Stallman @ 2012-10-07 17:30 UTC (permalink / raw
  To: Paul Eggert; +Cc: jay.p.belanger, reingold, emacs-devel

    For example, England never used the Emacs Julian calendar:
    before 1752, English years started on March 25, and after
    1752 England used Gregorian.  The Holy Roman Empire used the
    Emacs Julian calendar for only four decades, from 1544 to
    1582.

That is a cryptic statement -- you're making some distinction that you
have not explained.

Please explain your distinction if you would like to convince people
with it.

-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call




^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-07  7:50         ` Paul Eggert
  2012-10-07  8:45           ` Eli Zaretskii
@ 2012-10-07 17:30           ` Richard Stallman
  2012-10-07 17:57             ` Juanma Barranquero
  1 sibling, 1 reply; 47+ messages in thread
From: Richard Stallman @ 2012-10-07 17:30 UTC (permalink / raw
  To: Paul Eggert; +Cc: jay.p.belanger, eliz, reingold, emacs-devel

      Caesar was killed on March 15 in the Julian
    calendar of the time, and this is probably (though not
    certainly) March 14 of the Emacs Julian calendar.  (I write
    "not certainly" because some of the details of the old
    Julian calendar were lost and have not been reconstructed to
    everybody's satisfaction.)

When was it changed?

-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call




^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-07 17:30           ` Richard Stallman
@ 2012-10-07 17:57             ` Juanma Barranquero
  0 siblings, 0 replies; 47+ messages in thread
From: Juanma Barranquero @ 2012-10-07 17:57 UTC (permalink / raw
  To: rms; +Cc: jay.p.belanger, eliz, Paul Eggert, reingold, emacs-devel

On Sun, Oct 7, 2012 at 7:30 PM, Richard Stallman <rms@gnu.org> wrote:

> you're making some distinction that you have not explained.

Presumably Paul is distinguishing between the Roman "julian calendar"
(introduced in 45 BC, following a really weird 445-days long 46 BC)
and posterior fixes and adjustments. For example, it was changed in
Augustus' time (a few decades after introduction) because they had
added a leap year every three years, not four. There were other
changes related to the start of the year, or to align chistian
festivities with some fixed point of the solar year.

And, in any case, that calendar wasn't as generally used as some
people think. In the Iberian Peninsula they used the "Hispanic Era",
with its origin at 38 BC, until the 14th century. So anyone using a
Julian date as "contemporary" to refer to Spain's history would only
be right from 1383 to 1582, approx. Less than two centuries (a bit
more in some parts of Spain, with a maximum of four centuries in
Catalonia). The crusades, from 3rd to 9th, would have a different date
if you asked contemporary catalonian or castilian people.

Aren't calendars fun?

    Juanma



^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-07 17:30           ` Richard Stallman
@ 2012-10-07 18:23             ` Paul Eggert
  2012-10-10  3:37               ` Richard Stallman
  0 siblings, 1 reply; 47+ messages in thread
From: Paul Eggert @ 2012-10-07 18:23 UTC (permalink / raw
  To: rms; +Cc: jay.p.belanger, reingold, emacs-devel

On 10/07/2012 10:30 AM, Richard Stallman wrote:
> you're making some distinction that you
> have not explained.  Please explain your distinction

The Julian calendar comes in many flavors, the details matter for
Emacs's purposes, and the flavor that England used before
1752 disagrees with the flavor reported by Emacs calc and
Unix cal.

Here are the two calendars in question for 1748, to give you an idea
of what's going on.  The two years have differing start and end dates,
and have differing numbers of days (one has 365 days, the other 366).

               1748 in England and British colonies

                                                   March
                                            Su Mo Tu We Th Fr Sa
                                                           25 26
                                            27 28 29 30 31

       April                  May                   June
Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa
                1  2   1  2  3  4  5  6  7            1  2  3  4
 3  4  5  6  7  8  9   8  9 10 11 12 13 14   5  6  7  8  9 10 11
10 11 12 13 14 15 16  15 16 17 18 19 20 21  12 13 14 15 16 17 18
17 18 19 20 21 22 23  22 23 24 25 26 27 28  19 20 21 22 23 24 25
24 25 26 27 28 29 30  29 30 31              26 27 28 29 30

        July                 August              September
Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa
                1  2      1  2  3  4  5  6               1  2  3
 3  4  5  6  7  8  9   7  8  9 10 11 12 13   4  5  6  7  8  9 10
10 11 12 13 14 15 16  14 15 16 17 18 19 20  11 12 13 14 15 16 17
17 18 19 20 21 22 23  21 22 23 24 25 26 27  18 19 20 21 22 23 24
24 25 26 27 28 29 30  28 29 30 31           25 26 27 28 29 30
31
      October               November              December
Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa
                   1         1  2  3  4  5               1  2  3
 2  3  4  5  6  7  8   6  7  8  9 10 11 12   4  5  6  7  8  9 10
 9 10 11 12 13 14 15  13 14 15 16 17 18 19  11 12 13 14 15 16 17
16 17 18 19 20 21 22  20 21 22 23 24 25 26  18 19 20 21 22 23 24
23 24 25 26 27 28 29  27 28 29 30           25 26 27 28 29 30 31
30 31
      January               February               March
Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa
 1  2  3  4  5  6  7            1  2  3  4            1  2  3  4
 8  9 10 11 12 13 14   5  6  7  8  9 10 11   5  6  7  8  9 10 11
15 16 17 18 19 20 21  12 13 14 15 16 17 18  12 13 14 15 16 17 18
22 23 24 25 26 27 28  19 20 21 22 23 24 25  19 20 21 22 23 24
29 30 31              26 27 28


         1748 according to Emacs calc and Unix cal

      January               February               March
Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa
                1  2      1  2  3  4  5  6         1  2  3  4  5
 3  4  5  6  7  8  9   7  8  9 10 11 12 13   6  7  8  9 10 11 12
10 11 12 13 14 15 16  14 15 16 17 18 19 20  13 14 15 16 17 18 19
17 18 19 20 21 22 23  21 22 23 24 25 26 27  20 21 22 23 24 25 26
24 25 26 27 28 29 30  28 29                 27 28 29 30 31
31
       April                  May                   June
Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa
                1  2   1  2  3  4  5  6  7            1  2  3  4
 3  4  5  6  7  8  9   8  9 10 11 12 13 14   5  6  7  8  9 10 11
10 11 12 13 14 15 16  15 16 17 18 19 20 21  12 13 14 15 16 17 18
17 18 19 20 21 22 23  22 23 24 25 26 27 28  19 20 21 22 23 24 25
24 25 26 27 28 29 30  29 30 31              26 27 28 29 30

        July                 August              September
Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa
                1  2      1  2  3  4  5  6               1  2  3
 3  4  5  6  7  8  9   7  8  9 10 11 12 13   4  5  6  7  8  9 10
10 11 12 13 14 15 16  14 15 16 17 18 19 20  11 12 13 14 15 16 17
17 18 19 20 21 22 23  21 22 23 24 25 26 27  18 19 20 21 22 23 24
24 25 26 27 28 29 30  28 29 30 31           25 26 27 28 29 30
31
      October               November              December
Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa  Su Mo Tu We Th Fr Sa
                   1         1  2  3  4  5               1  2  3
 2  3  4  5  6  7  8   6  7  8  9 10 11 12   4  5  6  7  8  9 10
 9 10 11 12 13 14 15  13 14 15 16 17 18 19  11 12 13 14 15 16 17
16 17 18 19 20 21 22  20 21 22 23 24 25 26  18 19 20 21 22 23 24
23 24 25 26 27 28 29  27 28 29 30           25 26 27 28 29 30 31
30 31




^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-07 13:57         ` Stefan Monnier
@ 2012-10-07 20:32           ` Paul Eggert
  2012-10-07 21:34             ` Tim Cross
                               ` (2 more replies)
  0 siblings, 3 replies; 47+ messages in thread
From: Paul Eggert @ 2012-10-07 20:32 UTC (permalink / raw
  To: Stefan Monnier; +Cc: emacs-devel

On 10/07/2012 06:57 AM, Stefan Monnier wrote:

> To the extent possible, Emacs could let the user specify the calendar
> indirectly by instead specifying a "context" (a place, plus whatever
> else is needed to resolve ambiguities), and then let Emacs figure out
> which calendar was used at that time in that context.

Yes, for example Emacs could examine (say) the TZ variable
plus optional extra info.  This would work in theory, but in
practice there would be many problems.

For example, I live the Los Angeles area, and presumably
Emacs would infer its calendrical behavior from my TZ
setting 'America/Los_Angeles'.  But what behavior would that
be, exactly?  To help answer that, here's L.A.'s calendrical
history as best I know:

  Settled by Tongva and Chumash thousands of years ago;
  exact years not known.  These people used calendars, which
  most likely did not agree with each other and varied with
  time, but the details are not known.

  Area first visited by Europeans in 1742.  The Cabrillo
  Expedition anchored in San Pedro and Santa Monica bays for
  one day each, then left and never returned.

  Area visited again in 1602 by the Vizcaíno Expedition, which
  also anchored for a couple of days and then moved on.

  Next known visit by the Portolá Expedition of 1769.  These
  are the first Europeans who are known to have set foot
  near what became Los Angeles downtown, although there are
  rumors of other visits before then.

  City officially founded 4 Sept 1781 (Gregorian).

Given the above, there are several problems in deciding how
Emacs should behave for TZ='America/Los_Angeles':

  Would its calendar change from "unknown" status to Old
  Spanish status in 1542 and then switch to Emacs Julian in
  1556 when Spain switched to Julian and then switch to
  Gregorian in 1582, all because Spanish explorers' ships
  dropped anchor nearby for a couple of days in 1542 and 1602?

  Or should the Los Angeles entry stay "unknown" until 1781
  because the city didn't exist until then?

  Or should it do something else?

No answer is satisfactory here -- whatever we'd put into the
table would be wrong for some common uses.

And Los Angeles is one of the *easy* cases.  There are
hundreds of other locations to do, many of them much harder
than Los Angeles, where we'd have worse problems, some
technical and some political.

Some other questions would come up too.  For instance:

  What do we do when a calendar is partly known, but not
  completely, as is the case for the Chumash calendar,
  or for Julius Caesar's Julian calendar?

  Should Emacs distinguish between "unknown" (that is, there
  was a calendar but we don't know what it was exactly, as
  in Los Angeles circa 1700) and "none" (that is, the area
  was uninhabited and had no calendar, as in Los Angeles
  circa 15,000 BC)?

  We could make some simplifying assumptions, e.g., use the
  Gregorian calendar when the actual calendar isn't fully
  known, but how would this be reflected to the user?  And
  if we're going to do that, why not just use Gregorian
  everywhere, as that's simpler?

I hope this helps to explain why adding a calendrical/locale
database would be a big project, and why any attempts to
build such a thing would run the risk hurting users (by
giving them wrong or misleading answers) as much as help
them.



^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-07 20:32           ` Paul Eggert
@ 2012-10-07 21:34             ` Tim Cross
  2012-10-08  0:32             ` Stefan Monnier
  2012-10-08 13:39             ` Richard Stallman
  2 siblings, 0 replies; 47+ messages in thread
From: Tim Cross @ 2012-10-07 21:34 UTC (permalink / raw
  To: Paul Eggert; +Cc: Stefan Monnier, emacs-devel

It seems to me this thread has gone a bit 'off the road' and is
perhaps trying to answer too many different things at once.

I thought the original post was asking if calc and the emacs calendar
should be using the same calendar definition. For consistency, I think
this should be yes. The question of what that calendar is and what
options could be added to allow the end user to select or specify
calendars or calendar parameters is possibly a different more complex
question requiring more analysis.

All the tools/facilities of emacs should use the same definiton - at
least then, if a user finds the result is incorrect, based on their
expectations, emacs will at least be consistently incorrect.

Tim

On 8 October 2012 07:32, Paul Eggert <eggert@cs.ucla.edu> wrote:
> On 10/07/2012 06:57 AM, Stefan Monnier wrote:
>
>> To the extent possible, Emacs could let the user specify the calendar
>> indirectly by instead specifying a "context" (a place, plus whatever
>> else is needed to resolve ambiguities), and then let Emacs figure out
>> which calendar was used at that time in that context.
>
> Yes, for example Emacs could examine (say) the TZ variable
> plus optional extra info.  This would work in theory, but in
> practice there would be many problems.
>
> For example, I live the Los Angeles area, and presumably
> Emacs would infer its calendrical behavior from my TZ
> setting 'America/Los_Angeles'.  But what behavior would that
> be, exactly?  To help answer that, here's L.A.'s calendrical
> history as best I know:
>
>   Settled by Tongva and Chumash thousands of years ago;
>   exact years not known.  These people used calendars, which
>   most likely did not agree with each other and varied with
>   time, but the details are not known.
>
>   Area first visited by Europeans in 1742.  The Cabrillo
>   Expedition anchored in San Pedro and Santa Monica bays for
>   one day each, then left and never returned.
>
>   Area visited again in 1602 by the Vizcaíno Expedition, which
>   also anchored for a couple of days and then moved on.
>
>   Next known visit by the Portolá Expedition of 1769.  These
>   are the first Europeans who are known to have set foot
>   near what became Los Angeles downtown, although there are
>   rumors of other visits before then.
>
>   City officially founded 4 Sept 1781 (Gregorian).
>
> Given the above, there are several problems in deciding how
> Emacs should behave for TZ='America/Los_Angeles':
>
>   Would its calendar change from "unknown" status to Old
>   Spanish status in 1542 and then switch to Emacs Julian in
>   1556 when Spain switched to Julian and then switch to
>   Gregorian in 1582, all because Spanish explorers' ships
>   dropped anchor nearby for a couple of days in 1542 and 1602?
>
>   Or should the Los Angeles entry stay "unknown" until 1781
>   because the city didn't exist until then?
>
>   Or should it do something else?
>
> No answer is satisfactory here -- whatever we'd put into the
> table would be wrong for some common uses.
>
> And Los Angeles is one of the *easy* cases.  There are
> hundreds of other locations to do, many of them much harder
> than Los Angeles, where we'd have worse problems, some
> technical and some political.
>
> Some other questions would come up too.  For instance:
>
>   What do we do when a calendar is partly known, but not
>   completely, as is the case for the Chumash calendar,
>   or for Julius Caesar's Julian calendar?
>
>   Should Emacs distinguish between "unknown" (that is, there
>   was a calendar but we don't know what it was exactly, as
>   in Los Angeles circa 1700) and "none" (that is, the area
>   was uninhabited and had no calendar, as in Los Angeles
>   circa 15,000 BC)?
>
>   We could make some simplifying assumptions, e.g., use the
>   Gregorian calendar when the actual calendar isn't fully
>   known, but how would this be reflected to the user?  And
>   if we're going to do that, why not just use Gregorian
>   everywhere, as that's simpler?
>
> I hope this helps to explain why adding a calendrical/locale
> database would be a big project, and why any attempts to
> build such a thing would run the risk hurting users (by
> giving them wrong or misleading answers) as much as help
> them.
>



-- 
Tim Cross



^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-07  6:36       ` Eli Zaretskii
  2012-10-07  7:50         ` Paul Eggert
@ 2012-10-07 21:55         ` Sam Steingold
  2012-10-08 13:39           ` Richard Stallman
  1 sibling, 1 reply; 47+ messages in thread
From: Sam Steingold @ 2012-10-07 21:55 UTC (permalink / raw
  To: emacs-devel

> * Eli Zaretskii <ryvm@tah.bet> [2012-10-07 08:36:46 +0200]:
>
> Try reading Russian history books, and you will see old dates right up
> to 1918.

Usually either both dates are supplied or they are more or less clearly
marked "old style".  When a date in 1700-1918 is supplied without an
old/new style note, half the readers assume old style and half the new
style; this confusion is so common, that lack of a style note is a sure
sign that the date is not to be trusted (to the extent that it may be
wrong in either style).

-- 
Sam Steingold (http://sds.podval.org/) on Ubuntu 12.04 (precise) X 11.0.11103000
http://www.childpsy.net/ http://palestinefacts.org http://www.memritv.org
http://pmw.org.il http://ffii.org http://think-israel.org
Don't ascribe to malice what can be adequately explained by stupidity.




^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-07 20:32           ` Paul Eggert
  2012-10-07 21:34             ` Tim Cross
@ 2012-10-08  0:32             ` Stefan Monnier
  2012-10-08  6:30               ` Paul Eggert
  2012-10-08 13:39             ` Richard Stallman
  2 siblings, 1 reply; 47+ messages in thread
From: Stefan Monnier @ 2012-10-08  0:32 UTC (permalink / raw
  To: Paul Eggert; +Cc: emacs-devel

>> To the extent possible, Emacs could let the user specify the calendar
>> indirectly by instead specifying a "context" (a place, plus whatever
>> else is needed to resolve ambiguities), and then let Emacs figure out
>> which calendar was used at that time in that context.
> Yes, for example Emacs could examine (say) the TZ variable
> plus optional extra info.

No, I really mean that the *user* should provide the info, not some
circumstantial evidence.  And I said "could", not "should".  So it was
really meant "if someone really wants to provide some way to get the
date according to the traditions of a particular place, then it's OK,
but only if that's done by querying the user about which place to use
(or combination of place and whatever else is needed to disambiguate the
request)".
So for now, Emacs should use the same default calendar for Calc,
Calendar, and whatever else uses dates; and it should be the Gregorian
calendar regardless of the requested date.


        Stefan



^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-08  0:32             ` Stefan Monnier
@ 2012-10-08  6:30               ` Paul Eggert
  2012-10-08  7:28                 ` Ulrich Mueller
                                   ` (2 more replies)
  0 siblings, 3 replies; 47+ messages in thread
From: Paul Eggert @ 2012-10-08  6:30 UTC (permalink / raw
  To: Stefan Monnier; +Cc: emacs-devel

On 10/07/2012 05:32 PM, Stefan Monnier wrote:

> So for now, Emacs should use the same default calendar for Calc,
> Calendar, and whatever else uses dates; and it should be the Gregorian
> calendar regardless of the requested date.

OK, here's a proposed patch to do that.  I used diff -b to generate
this patch, to avoid spurious differences due to indentation changes,
but the actual patch will indent properly.

Is this OK for 24.3?

=== modified file 'doc/misc/ChangeLog'
--- doc/misc/ChangeLog	2012-10-06 01:42:02 +0000
+++ doc/misc/ChangeLog	2012-10-08 05:54:07 +0000
@@ -1,3 +1,8 @@
+2012-10-08  Paul Eggert  <eggert@cs.ucla.edu>
+
+	Calc now uses the Gregorian calendar for all dates.
+	* calc.texi (Date Forms): Use the Gregorian calendar uniformly.
+
 2012-10-06  Glenn Morris  <rgm@gnu.org>
 
 	* erc.texi: Include emacsver.texi, and use EMACSVER rather than

=== modified file 'doc/misc/calc.texi'
--- doc/misc/calc.texi	2012-10-05 07:38:05 +0000
+++ doc/misc/calc.texi	2012-10-08 05:52:10 +0000
@@ -11010,35 +11010,15 @@
 of a date form.  @xref{Packing and Unpacking}.
 
 Date forms can go arbitrarily far into the future or past.  Negative
-year numbers represent years BC.  Calc uses a combination of the
-Gregorian and Julian calendars, following the history of Great
-Britain and the British colonies.  This is the same calendar that
-is used by the @code{cal} program in most Unix implementations.
-
-@cindex Julian calendar
-@cindex Gregorian calendar
-Some historical background:  The Julian calendar was created by
-Julius Caesar in the year 46 BC as an attempt to fix the gradual
-drift caused by the lack of leap years in the calendar used
-until that time.  The Julian calendar introduced an extra day in
-all years divisible by four.  After some initial confusion, the
-calendar was adopted around the year we call 8 AD.  Some centuries
-later it became apparent that the Julian year of 365.25 days was
-itself not quite right.  In 1582 Pope Gregory XIII introduced the
-Gregorian calendar, which added the new rule that years divisible
-by 100, but not by 400, were not to be considered leap years
-despite being divisible by four.  Many countries delayed adoption
-of the Gregorian calendar because of religious differences;
-in Britain it was put off until the year 1752, by which time
-the Julian calendar had fallen eleven days behind the true
-seasons.  So the switch to the Gregorian calendar in early
-September 1752 introduced a discontinuity:  The day after
-Sep 2, 1752 is Sep 14, 1752.  Calc follows this convention.
-To take another example, Russia waited until 1918 before
-adopting the new calendar, and thus needed to remove thirteen
-days (between Feb 1, 1918 and Feb 14, 1918).  This means that
-Calc's reckoning will be inconsistent with Russian history between
-1752 and 1918, and similarly for various other countries.
+year numbers represent years BC.
+There is no ``year 0''; the day before
+@samp{<Mon Jan 1, +1>} is @samp{<Sun Dec 31, -1>}.  These are
+days 2 and 1 respectively in Calc's internal numbering scheme.
+
+Calc uses the Gregorian calendar for all dates, including dates
+before the actual use of the Gregorian calendar.
+Thus Calc's use of the day number @mathit{-10000} to
+represent August 14, 28 BC should be taken with a grain of salt.
 
 Today's timekeepers introduce an occasional ``leap second'' as
 well, but Calc does not take these minor effects into account.
@@ -11046,15 +11026,6 @@
 between, say, @samp{<12:00am Mon Jan 1, 1900>} and
 @samp{<12:00am Sat Jan 1, 2000>}.)
 
-Calc uses the Julian calendar for all dates before the year 1752,
-including dates BC when the Julian calendar technically had not
-yet been invented.  Thus the claim that day number @mathit{-10000} is
-called ``August 16, 28 BC'' should be taken with a grain of salt.
-
-Please note that there is no ``year 0''; the day before
-@samp{<Sat Jan 1, +1>} is @samp{<Fri Dec 31, -1>}.  These are
-days 0 and @mathit{-1} respectively in Calc's internal numbering scheme.
-
 @cindex Julian day counting
 Another day counting system in common use is, confusingly, also called
 ``Julian.''  The Julian day number is the numbers of days since

=== modified file 'etc/ChangeLog'
--- etc/ChangeLog	2012-10-07 10:07:23 +0000
+++ etc/ChangeLog	2012-10-08 05:54:42 +0000
@@ -1,3 +1,8 @@
+2012-10-08  Paul Eggert  <eggert@cs.ucla.edu>
+
+	Calc now uses the Gregorian calendar for all dates.
+	* NEWS (Calc): Document this.
+
 2012-10-07  Jan Djärv  <jan.h.d@swipnet.se>
 
 	* NEWS (NextStep/OSX port changes): OSX 10.4 or newer is required.

=== modified file 'etc/NEWS'
--- etc/NEWS	2012-10-07 10:07:23 +0000
+++ etc/NEWS	2012-10-08 05:48:55 +0000
@@ -278,6 +278,15 @@
 *** Option `Buffer-menu-buffer+size-width' is now obsolete.
 Use `Buffer-menu-name-width' and `Buffer-menu-size-width' instead.
 
+** Calc
+
+*** Calc now uses the Gregorian calendar for all dates.  This is
+consistent with how Calendar behaves.  Previously Calc used the Julian
+calendar for dates before September 14, 1752, under the theory that
+this corresponded to the history of England and of British colonies,
+but this theory is incorrect -- for example, the year 1751 was a short
+year of 282 days in England.
+
 ** Calendar
 
 *** You can customize the header text that appears above each calendar month.

=== modified file 'lisp/ChangeLog'
--- lisp/ChangeLog	2012-10-08 05:19:15 +0000
+++ lisp/ChangeLog	2012-10-08 06:02:16 +0000
@@ -1,3 +1,19 @@
+2012-10-08  Paul Eggert  <eggert@cs.ucla.edu>
+
+	Calc now uses the Gregorian calendar for all dates.
+	This is more consistent with Calendar.  Previously, Calc used the
+	Julian calendar for dates before September 14, 1752, under the
+	theory that this corresponded to the history of England and of
+	British colonies, but this theory is incorrect -- for example, the
+	year 1751 was a short year of 282 days in England.
+	Problem reported by Jay Belanger in
+	<http://lists.gnu.org/archive/html/emacs-devel/2012-10/msg00298.html>.
+	* calc/calc-forms.el (math-date-to-dt, math-leap-year-p)
+	(math-day-number, math-absolute-from-date)
+	(math-julian-date-beginning, math-julian-date-beginning-int)
+	(calcFunc-newmonth, calcFunc-newyear):
+	Implement this.
+
 2012-10-08  Fabián Ezequiel Gallina  <fgallina@cuca>
 
 	Enhancements on forward-sexp movement.

=== modified file 'lisp/calc/calc-forms.el'
--- lisp/calc/calc-forms.el	2012-09-17 05:41:04 +0000
+++ lisp/calc/calc-forms.el	2012-10-08 05:55:23 +0000
@@ -369,12 +369,11 @@
 
 ;;; Some of these functions are adapted from Edward Reingold's "calendar.el".
 ;;; These versions are rewritten to use arbitrary-size integers.
-;;; The Julian calendar is used up to 9/2/1752, after which the Gregorian
-;;; calendar is used; the first day after 9/2/1752 is 9/14/1752.
+;;; The Gregorian calendar is used even for older dates.
 
 ;;; A numerical date is the number of days since midnight on
-;;; the morning of January 1, 1 A.D.  If the date is a non-integer,
-;;; it represents a specific date and time.
+;;; the morning of December 30, 1 BC (Gregorian).
+;;; If the date is a non-integer, it represents a specific date and time.
 ;;; A "dt" is a list of the form, (year month day), corresponding to
 ;;; an integer code, or (year month day hour minute second), corresponding
 ;;; to a non-integer code.
@@ -390,8 +389,8 @@
 	 (month 1)
 	 day
 	 (year (math-quotient (math-add date (if (Math-lessp date 711859)
-						 365  ; for speed, we take
-					       -108)) ; >1950 as a special case
+						 367  ; for speed, we take
+					       -106)) ; >1950 as a special case
 			      (if (math-negp value) 366 365)))
 					; this result may be an overestimate
 	 temp)
@@ -399,8 +398,6 @@
       (setq year (math-add year -1)))
     (if (eq year 0) (setq year -1))
     (setq date (1+ (math-sub date temp)))
-    (and (eq year 1752) (>= date 247)
-	 (setq date (+ date 11)))
     (setq temp (if (math-leap-year-p year)
 		   [1 32 61 92 122 153 183 214 245 275 306 336 999]
 		 [1 32 60 91 121 152 182 213 244 274 305 335 999]))
@@ -447,13 +444,11 @@
   (nth 5 (decode-time)))
 
 (defun math-leap-year-p (year)
-  (if (Math-lessp year 1752)
       (if (math-negp year)
-	  (= (math-imod (math-neg year) 4) 1)
-	(= (math-imod year 4) 0))
+      (setq year (math-add 1 year)))
     (setq year (math-imod year 400))
     (or (and (= (% year 4) 0) (/= (% year 100) 0))
-	(= year 0))))
+      (= year 0)))
 
 (defun math-days-in-month (year month)
   (if (and (= month 2) (math-leap-year-p year))
@@ -467,10 +462,6 @@
 	  (setq day-of-year (- day-of-year (/ (+ 23 (* 4 month)) 10)))
 	  (if (math-leap-year-p year)
 	      (setq day-of-year (1+ day-of-year)))))
-    (and (eq year 1752)
-	 (or (> month 9)
-	     (and (= month 9) (>= day 14)))
-	 (setq day-of-year (- day-of-year 11)))
     day-of-year))
 
 (defun math-absolute-from-date (year month day)
@@ -483,15 +474,12 @@
 				    (math-sub 365
 					      (math-quotient (math-sub 3 year)
 							     4)))))
-	      (if (or (Math-lessp year 1753)
-		      (and (eq year 1752) (<= month 9)))
-		  1
 		(let ((correction (math-mul (math-quotient yearm1 100) 3)))
 		  (let ((res (math-idivmod correction 4)))
 		    (math-add (if (= (cdr res) 0)
 				  -1
 				0)
-			      (car res))))))))
+			    (car res)))))))
 
 
 ;;; It is safe to redefine these in your init file to use a different
@@ -550,11 +538,11 @@
 
 (defconst math-julian-date-beginning '(float 17214235 -1)
   "The beginning of the Julian calendar,
-as measured in the number of days before January 1 of the year 1AD.")
+as measured in the number of days before December 30, 1 BC (Gregorian).")
 
 (defconst math-julian-date-beginning-int 1721424
   "The beginning of the Julian calendar,
-as measured in the integer number of days before January 1 of the year 1AD.")
+as measured in the integer number of days before December 30, 1 BC (Gregorian).")
 
 (defun math-format-date-part (x)
   (cond ((stringp x)
@@ -1437,8 +1425,6 @@
   (let ((dt (math-date-to-dt date)))
     (if (or (= day 0) (> day (math-days-in-month (car dt) (nth 1 dt))))
 	(setq day (math-days-in-month (car dt) (nth 1 dt))))
-    (and (eq (car dt) 1752) (= (nth 1 dt) 9)
-	 (if (>= day 14) (setq day (- day 11))))
     (list 'date (math-add (math-dt-to-date (list (car dt) (nth 1 dt) 1))
 			  (1- day)))))
 
@@ -1448,8 +1434,7 @@
   (or (integerp day) (math-reject-arg day 'fixnump))
   (let ((dt (math-date-to-dt date)))
     (if (and (>= day 0) (<= day 366))
-	(let ((max (if (eq (car dt) 1752) 355
-		     (if (math-leap-year-p (car dt)) 366 365))))
+	(let ((max (if (math-leap-year-p (car dt)) 366 365)))
 	  (if (or (= day 0) (> day max)) (setq day max))
 	  (list 'date (math-add (math-dt-to-date (list (car dt) 1 1))
 				(1- day))))
@@ -1523,7 +1508,7 @@
 (defun calcFunc-holiday (a)
   (if (cdr (math-to-business-day a)) 1 0))
 
-;;; Compute the number of business days since Jan 1, 1 AD.
+;;; Compute the number of business days since December 30, 1 BC (Gregorian).
 
 (defun math-to-business-day (date &optional need-year)
   (if (eq (car-safe date) 'date)
@@ -1564,7 +1549,8 @@
     (cons (math-add (math-sub day delta) time) holiday)))
 
 
-;;; Compute the date a certain number of business days since Jan 1, 1 AD.
+;;; Compute the date from a certain number of business days since
+;;; December 30, 1 BC (Gregorian).
 ;;; If this returns nil, holiday table was adjusted; redo calculation.
 
 (defun math-from-business-day (num)






^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-08  6:30               ` Paul Eggert
@ 2012-10-08  7:28                 ` Ulrich Mueller
  2012-10-08 13:56                   ` Stefan Monnier
  2012-10-08  8:21                 ` James Cloos
  2012-10-08 14:59                 ` Jay Belanger
  2 siblings, 1 reply; 47+ messages in thread
From: Ulrich Mueller @ 2012-10-08  7:28 UTC (permalink / raw
  To: Paul Eggert; +Cc: emacs-devel

>>>>> On Sun, 07 Oct 2012, Paul Eggert wrote:

> +There is no ``year 0''; the day before
> +@samp{<Mon Jan 1, +1>} is @samp{<Sun Dec 31, -1>}.  These are
> +days 2 and 1 respectively in Calc's internal numbering scheme.

If the goal is to make calc and calendar compatible, wouldn't it also
make sense to shift the numbering of days, so that <Mon Jan 1, +1>
(Gregorian) will have day number 1?

That is, use the same day counting as calendar does:

   (calendar-absolute-from-gregorian '(12 31 -1))
   0

   (calendar-absolute-from-gregorian '(1 1 1))
   1

Ulrich



^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-08  6:30               ` Paul Eggert
  2012-10-08  7:28                 ` Ulrich Mueller
@ 2012-10-08  8:21                 ` James Cloos
  2012-10-08 14:59                 ` Jay Belanger
  2 siblings, 0 replies; 47+ messages in thread
From: James Cloos @ 2012-10-08  8:21 UTC (permalink / raw
  To: Paul Eggert; +Cc: Stefan Monnier, emacs-devel

I would't remove the history lesson; just note after the lesson that
calc sticks with the modern calendar even before it was introduced.

-JimC
-- 
James Cloos <cloos@jhcloos.com>         OpenPGP: 1024D/ED7DAEA6



^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-07 20:32           ` Paul Eggert
  2012-10-07 21:34             ` Tim Cross
  2012-10-08  0:32             ` Stefan Monnier
@ 2012-10-08 13:39             ` Richard Stallman
  2012-10-08 19:34               ` Paul Eggert
  2 siblings, 1 reply; 47+ messages in thread
From: Richard Stallman @ 2012-10-08 13:39 UTC (permalink / raw
  To: Paul Eggert; +Cc: monnier, emacs-devel

The difficulties you cite come from the idea of specifying a place
in order to determine the calendar.
   
My suggestion was to specify a jurisdiction, an entity that had a
calendrical policy.  Examples of pertinent jurisdictions could be
"England", "Vatican", and "Spain".  "US" could be an alias for
"England".

For Los Angeles you could probably understand everything using the
"Spain" jurisdiction.  "US" is equivalent to "Spain" for the dates
where the "US" jurisdiction is pertinent in Los Angeles.

We would not need to try to have a "Chumash" jurisdiction.

To handle calendar replacement cleanly does not entail trying to
support every calendar that has ever been used anywhere.

-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call




^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-07 21:55         ` Sam Steingold
@ 2012-10-08 13:39           ` Richard Stallman
  0 siblings, 0 replies; 47+ messages in thread
From: Richard Stallman @ 2012-10-08 13:39 UTC (permalink / raw
  To: sds; +Cc: emacs-devel

    Usually either both dates are supplied or they are more or less clearly
    marked "old style".  When a date in 1700-1918 is supplied without an
    old/new style note, half the readers assume old style and half the new
    style; this confusion is so common, that lack of a style note is a sure
    sign that the date is not to be trusted (to the extent that it may be
    wrong in either style).

This suggests that, at least for the case of Russia, it is no problem
if the Emacs calendar uses the Gregorian calendar (as now) for Russia
in that period.

What did Russia do for a calendar before 1700?  And what do modern
historians use when writing dates for that period?

-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call




^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-08  7:28                 ` Ulrich Mueller
@ 2012-10-08 13:56                   ` Stefan Monnier
  2012-10-08 14:49                     ` Jay Belanger
  0 siblings, 1 reply; 47+ messages in thread
From: Stefan Monnier @ 2012-10-08 13:56 UTC (permalink / raw
  To: Ulrich Mueller; +Cc: Paul Eggert, emacs-devel

> If the goal is to make calc and calendar compatible, wouldn't it also
> make sense to shift the numbering of days, so that <Mon Jan 1, +1>
> (Gregorian) will have day number 1?

I wish/hope that Calc can use Calendar's code to do the conversions.


        Stefan



^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-08 13:56                   ` Stefan Monnier
@ 2012-10-08 14:49                     ` Jay Belanger
  0 siblings, 0 replies; 47+ messages in thread
From: Jay Belanger @ 2012-10-08 14:49 UTC (permalink / raw
  To: Stefan Monnier; +Cc: jay.p.belanger, emacs-devel


>> If the goal is to make calc and calendar compatible, wouldn't it also
>> make sense to shift the numbering of days, so that <Mon Jan 1, +1>
>> (Gregorian) will have day number 1?
>
> I wish/hope that Calc can use Calendar's code to do the conversions.

Calc can use arbitrary sized integers to store dates, so it can't
directly use Calendar's code.  It does use rewritten versions of
Calendar's code though (rewritten so it can use large integers).



^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-08  6:30               ` Paul Eggert
  2012-10-08  7:28                 ` Ulrich Mueller
  2012-10-08  8:21                 ` James Cloos
@ 2012-10-08 14:59                 ` Jay Belanger
  2012-10-13  6:02                   ` Paul Eggert
  2 siblings, 1 reply; 47+ messages in thread
From: Jay Belanger @ 2012-10-08 14:59 UTC (permalink / raw
  To: emacs-devel; +Cc: jay.p.belanger


>> So for now, Emacs should use the same default calendar for Calc,
>> Calendar, and whatever else uses dates; and it should be the Gregorian
>> calendar regardless of the requested date.
>
> OK, here's a proposed patch to do that.

The patch makes the Gregorian calendar the only choice for Calc, though,
not just the default.  It should be configurable, so someone could still
have the current behavior if they wanted.




^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-08 13:39             ` Richard Stallman
@ 2012-10-08 19:34               ` Paul Eggert
  2012-10-08 22:39                 ` Richard Stallman
  0 siblings, 1 reply; 47+ messages in thread
From: Paul Eggert @ 2012-10-08 19:34 UTC (permalink / raw
  To: rms; +Cc: emacs-devel

On 10/08/2012 06:39 AM, Richard Stallman wrote:

> For Los Angeles you could probably understand everything using the
> "Spain" jurisdiction.

After 1556 yes, but before that the Spanish variant of the
Julian calendar is probably not what users want.

And Los Angeles is an easy case.  Often it's harder.  Would
we ask Budapest users to manually switch among all the
jurisdictions that have controlled that city: "Hungarian",
"Romanian", "Austro-Hungarian", "Habsburg", "Ottoman",
"Angevin", etc., etc.?  That'd be even more work for
Budapest users than what we have now, where they just pick
the calendar they want.

> What did Russia do for a calendar before 1700?

It was a mess.  Partly it used the Byzantine calendar, where
the year before 1700 AD was 7207 AM (and it was a short year
-- four months long).  But medieval Rus also used at least
two other calendars, which were similar to the Byzantine but
which started the year at different dates.

> And what do modern historians use when writing dates for
> that period?

It depends.  You have to check.  I just did a Google Books
search for chronologies of medieval Russia and examined the
first book I found, and it says on pages xii-xiii that it
uses Gregorian for everything.  But Julian is also common.
The book I checked was:

Langer LN, Historical Dictionary of Medieval Russia,
Scarecrow Press (2002), ISBN 0-8108-4080-4.



^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-08 19:34               ` Paul Eggert
@ 2012-10-08 22:39                 ` Richard Stallman
  2012-10-09  6:28                   ` Paul Eggert
  2012-10-10 21:42                   ` Christoph Herzog
  0 siblings, 2 replies; 47+ messages in thread
From: Richard Stallman @ 2012-10-08 22:39 UTC (permalink / raw
  To: Paul Eggert; +Cc: emacs-devel

    > For Los Angeles you could probably understand everything using the
    > "Spain" jurisdiction.

    After 1556 yes, but before that the Spanish variant of the
    Julian calendar is probably not what users want.

Once again, you're being cryptic.  That objection seems to be a red herring
since all the dates you gave are after 1556.

    Would
    we ask Budapest users to manually switch among all the
    jurisdictions that have controlled that city: "Hungarian",
    "Romanian", "Austro-Hungarian", "Habsburg", "Ottoman",
    "Angevin", etc., etc.?

Maybe one named "Hungarian" would be most convenient.
But in practice it is possible (depending on facts) that they
could use Austrian and it would work.

Did the Ottoman empire use the Islamic calendar?
If so, most Hungarians probably used some Christian calendar
during that period, and would be more satisfied if that one
were used for those years.

Basically you are trying to make this idea fail
by being too rigid about it.  That approach shows nothing
about whether it COULD be a useful fuature.
The only way we can tell that is if someone looks at it
trying to make it useful.


-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call




^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-08 22:39                 ` Richard Stallman
@ 2012-10-09  6:28                   ` Paul Eggert
  2012-10-09 15:47                     ` Richard Stallman
  2012-10-10 21:42                   ` Christoph Herzog
  1 sibling, 1 reply; 47+ messages in thread
From: Paul Eggert @ 2012-10-09  6:28 UTC (permalink / raw
  To: rms; +Cc: emacs-devel

On 10/08/2012 03:39 PM, Richard Stallman wrote:

> ... That objection seems to be a red herring
> since all the dates you gave are after 1556.

My email had a typo.  The Cabrillo Expedition was in 1542, not 1742.
The objection was not a red herring.  Sorry about the confusion.

> Maybe one named "Hungarian" would be most convenient.

Two jurisdictions around then could plausibly be called "Hungarian",
but neither one controlled what is now Budapest.  Using the name
"Hungarian" for the jurisdiction that controlled Budapest back then
would be ahistorical; it'd be a bit like using the name "German" for
the jurisdiction that now controls Kaliningrad, Russia,
merely because what is now Kaliningrad was formerly part of Germany.

> Did the Ottoman empire use the Islamic calendar?

Yes, back then.

> If so, most Hungarians probably used some Christian calendar
> during that period, and would be more satisfied if that one
> were used for those years.

Yes, no doubt most Hungarians of the time would have preferred some
Christian calendar.  But they weren't running the show, and for all I
know were not even a majority in the area in question.

This was not a temporary situation: the area was part of the
Ottoman Empire for longer than Colorado has been a U.S. state.

> Basically you are trying to make this idea fail
> by being too rigid about it.

Mostly, I'm just trying to explain how calendars get used.




^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-09  6:28                   ` Paul Eggert
@ 2012-10-09 15:47                     ` Richard Stallman
  2012-10-09 23:10                       ` Paul Eggert
  0 siblings, 1 reply; 47+ messages in thread
From: Richard Stallman @ 2012-10-09 15:47 UTC (permalink / raw
  To: Paul Eggert; +Cc: emacs-devel

You are arguing against a proposal that would apply complex objective
criteria, yet to be defined, to judge the "correct" calendar for each
time and place, going back into prehistory.

I agree with you that that would be a mistake.  But since nobody
proposed it, why argue against it?

I'm talking about doing simple things that would be useful to some
real users.  We would extend it as far as it can usefully go, without
trying to describe the calendar shifts of every point on earth.

I will respond to some of your points to show the difference between
these two ideas.

    Two jurisdictions around then could plausibly be called "Hungarian",
    but neither one controlled what is now Budapest.

I don't think it matters whether any of them controlled Buda.  If,
however, they used different calendars, that might mean it is hard to
give a useful meaning to a Hungarian calendar domain in that period.

    Yes, no doubt most Hungarians of the time would have preferred some
    Christian calendar.  But they weren't running the show,

For this purpose, which is to help people understand books that deal
with Hungarian history, who ruled Hungary (or Buda) at the time is not
the determining question for what a "Hungarian" calendar domain would
usefully say.  A Hungarian history book probably won't give dates from
the Ottoman occupation based on the hegira (I can ask some Hungarians
if you like), and neither would an English book about Hungarian
history.

							    and for all I
    know were not even a majority in the area in question.

I think they were, for a considerable part of Hungary, but that's not
a crucial question for this purpose: defining a "Hungarian" calendar
domain that might be useful for people today who are thinking about
dates in the Hungarian past.

Perhaps all modern books about Hungarian history use the Gregorian
calendar even back to the 800s.  If so, there is no need for a
"Hungarian" domain and I would not make one.

I would create only the domains that are actually useful for users.
There is no reason to insist on "complete or nothing".

-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call




^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-09 15:47                     ` Richard Stallman
@ 2012-10-09 23:10                       ` Paul Eggert
  2012-10-10  2:22                         ` Jay Belanger
  2012-10-10  3:37                         ` Richard Stallman
  0 siblings, 2 replies; 47+ messages in thread
From: Paul Eggert @ 2012-10-09 23:10 UTC (permalink / raw
  To: rms; +Cc: emacs-devel

On 10/09/2012 08:47 AM, Richard Stallman wrote:

> a crucial question for this purpose: defining a "Hungarian" calendar
> domain that might be useful for people today who are thinking about
> dates in the Hungarian past.

Good point.  So, as I understand it, the case you're worried
about is a source where the author's practice is something
like the following:

   This book uses the Gregorian calendar for dates from 14
   September 1752 onwards, and the Julian calendar starting
   on January 1 for dates before that.  The calendar is not
   otherwise indicated.

No doubt some books exist like that, but in my experience
the following sorts of rules are more typical:

  "For the purposes of this book, all dates are given using
   the modern Gregorian calendar unless specifically
   followed by the O.S. designation."
     -- David Marley, Wars of the Americas, ABC-CLIO (2008),
	page xiii.

  "I distinguish old style (o.s.) from "new style" (n.s.)
   dates in chapter 1, but in later chapters the reader
   should understand that all dates are modern or new style,
   unless otherwise indicated."
     -- Allan Everett Marble, Surgeons, Smallpox, and the Poor
	(McGill-Queens, 1997), p. 11

  "In this book Continental dates in the period 1582-1752
   can generally be assumed to be given according to the
   Gregorian system, and British (and American) dates of the
   period according to the Julian system, but with the year
   in all cases deemed to begin on 1 January, not 25 March.
   However, when dates are taken from a great variety of
   sources, as they are in a book like this, it is not
   always possible to be sure which system has been used"

   -- Ian Chilvers, The Oxford Dictionary of Art (OUP, 2004), p. vii.

That is, when there is possible confusion about the calendar,
there is a book-specific set of rules that typically cannot
easily be reduced to the Unix cal rule, or to a rule that
is more-easily programmable than what Emacs calendar already
does.



^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-09 23:10                       ` Paul Eggert
@ 2012-10-10  2:22                         ` Jay Belanger
  2012-10-11 12:09                           ` Jason Rumney
  2012-10-10  3:37                         ` Richard Stallman
  1 sibling, 1 reply; 47+ messages in thread
From: Jay Belanger @ 2012-10-10  2:22 UTC (permalink / raw
  To: emacs-devel; +Cc: jay.p.belanger


> Good point.  So, as I understand it, the case you're worried
> about is a source where the author's practice is something
> like the following:
>
>    This book uses the Gregorian calendar for dates from 14
>    September 1752 onwards, and the Julian calendar starting
>    on January 1 for dates before that.  The calendar is not
>    otherwise indicated.
>
> No doubt some books exist like that, but in my experience
> the following sorts of rules are more typical:
>
>   "For the purposes of this book, all dates are given using
>    the modern Gregorian calendar unless specifically
>    followed by the O.S. designation."
>      -- David Marley, Wars of the Americas, ABC-CLIO (2008),
> 	page xiii.

As much as there is one, the consensus in this discussion seems to be
that the pure Gregorian calendar should be the default, but the user
should be able to explicitly ask for something else (from a choice of
other options and, perhaps, some more general settings could be
available).  Which makes your typical situation the default and the 
"no doubt ... exist" situation an option that the user can explicitly
ask for.
I'll make sure that something like that is in Calc after the next Emacs
release.  

(Note that Isaac Newton's birthday is December 25 in the Julian
calendar, so some sort of hybrid calendar would be desirable for those
who want Grav-mass to be that date.:)



^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-09 23:10                       ` Paul Eggert
  2012-10-10  2:22                         ` Jay Belanger
@ 2012-10-10  3:37                         ` Richard Stallman
  1 sibling, 0 replies; 47+ messages in thread
From: Richard Stallman @ 2012-10-10  3:37 UTC (permalink / raw
  To: Paul Eggert; +Cc: emacs-devel

    Good point.  So, as I understand it, the case you're worried
    about is a source where the author's practice is something
    like the following:

       This book uses the Gregorian calendar for dates from 14
       September 1752 onwards, and the Julian calendar starting
       on January 1 for dates before that.  The calendar is not
       otherwise indicated.

This is not the only case I am concerned with.  Using the
Julian calendar with years starting with some other date
is also a possibility we might want to handle.  It is just a matter
of what is useful.

      "For the purposes of this book, all dates are given using
       the modern Gregorian calendar unless specifically
       followed by the O.S. designation."

This book doesn't need such support.  That doesn't
say anything about the issue, though.

      "In this book Continental dates in the period 1582-1752
       can generally be assumed to be given according to the
       Gregorian system, and British (and American) dates of the
       period according to the Julian system, but with the year
       in all cases deemed to begin on 1 January, not 25 March.

The very feature you discuss (quoted above) could be useful for this
book.

-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call




^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-07 18:23             ` Paul Eggert
@ 2012-10-10  3:37               ` Richard Stallman
  0 siblings, 0 replies; 47+ messages in thread
From: Richard Stallman @ 2012-10-10  3:37 UTC (permalink / raw
  To: Paul Eggert; +Cc: jay.p.belanger, reingold, emacs-devel

    Here are the two calendars in question for 1748, to give you an idea
    of what's going on.  The two years have differing start and end dates,
    and have differing numbers of days (one has 365 days, the other 366).

The Emacs calendar displays as a series of months, it would not be
hard to support starting the year at a different month.

Starting the year at a day that is not first of a month is not hard either.
The only hard part is how to show the user where the year starts.

-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call




^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-08 22:39                 ` Richard Stallman
  2012-10-09  6:28                   ` Paul Eggert
@ 2012-10-10 21:42                   ` Christoph Herzog
  1 sibling, 0 replies; 47+ messages in thread
From: Christoph Herzog @ 2012-10-10 21:42 UTC (permalink / raw
  To: emacs-devel

On 10/09/2012 12:39 AM, Richard Stallman wrote:
> Did the Ottoman empire use the Islamic calendar?

They used two calenders at the same time. One Hijri (lunar Islamic 
calendar) and one Mali (fiscal, Julian calendar based but Hijri-years). 
There were so-called Sıvış years (leap years) that were omitted in the 
fiscal calendar (roughly every 30 years), until at some point they 
decided to let the years diverge so that by the beginning of the 20th 
century there was a difference of two years, e.g. 1324 Mali was 1908 as 
was 1326 Hijri.

Basically, the important (and hard) thing is to have reliable calendar 
conversion. It makes sense to use the Gregorian calendar as a reference 
system, as a kind of yardstick (or tertium comparationis, if you like) 
to easier compare and relate dates given in different historical 
calendar systems even if, strictly speaking, it may be anachronistic.






^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-10  2:22                         ` Jay Belanger
@ 2012-10-11 12:09                           ` Jason Rumney
  2012-10-12  1:52                             ` Richard Stallman
  0 siblings, 1 reply; 47+ messages in thread
From: Jason Rumney @ 2012-10-11 12:09 UTC (permalink / raw
  To: jay.p.belanger; +Cc: emacs-devel

Jay Belanger <jay.p.belanger@gmail.com> writes:

> As much as there is one, the consensus in this discussion seems to be
> that the pure Gregorian calendar should be the default, but the user
> should be able to explicitly ask for something else (from a choice of
> other options and, perhaps, some more general settings could be
> available).

I think what would be most useful to users is for a message to to appear
in the echo area informing the user that the result is given in the
Gregorian calendar and other calendars may apply whenever the result is
a historical date (before 1900 if we use the Russian case as the
cutoff). The message could also inform about Emacs functions to convert
between calendar systems, or even offer keyboard shortcuts to do the
conversion immediately (in the case of calendar).

Although there are calendars other than Gregorian still in use today,
the message might be seen as noise if it appears for every calendar
calculation, and people wanting those calendars probably don't need
reminding that the date may differ between calendars.




^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-11 12:09                           ` Jason Rumney
@ 2012-10-12  1:52                             ` Richard Stallman
  0 siblings, 0 replies; 47+ messages in thread
From: Richard Stallman @ 2012-10-12  1:52 UTC (permalink / raw
  To: Jason Rumney; +Cc: jay.p.belanger, emacs-devel

    I think what would be most useful to users is for a message to to appear
    in the echo area informing the user that the result is given in the
    Gregorian calendar and other calendars may apply whenever the result is
    a historical date (before 1900 if we use the Russian case as the
    cutoff).

This could be a good idea.

-- 
Dr Richard Stallman
President, Free Software Foundation
51 Franklin St
Boston MA 02110
USA
www.fsf.org  www.gnu.org
Skype: No way! That's nonfree (freedom-denying) software.
  Use Ekiga or an ordinary phone call




^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-08 14:59                 ` Jay Belanger
@ 2012-10-13  6:02                   ` Paul Eggert
  2012-10-13 14:05                     ` Jay Belanger
  0 siblings, 1 reply; 47+ messages in thread
From: Paul Eggert @ 2012-10-13  6:02 UTC (permalink / raw
  To: jay.p.belanger; +Cc: Ulrich Mueller, James Cloos, emacs-devel

On 10/08/2012 12:28 AM, Ulrich Mueller wrote:

> If the goal is to make calc and calendar compatible, wouldn't it also
> make sense to shift the numbering of days, so that <Mon Jan 1, +1>
> (Gregorian) will have day number 1?

Yes, that makes sense.  I did that in the revised patch, which I filed
as Bug#12633 <http://bugs.gnu.org/12633>.

On 10/08/2012 01:21 AM, James Cloos wrote:
> I would't remove the history lesson

Fair enough, I also did that in the revised patch, fixing some
bugs in the history while I was at it.

On 10/08/2012 07:59 AM, Jay Belanger wrote:
> The patch makes the Gregorian calendar the only choice for Calc, though,
> not just the default.  It should be configurable
On 10/11/2012 05:09 AM, Jason Rumney wrote:
> I think what would be most useful to users is for a message to to appear
> in the echo area

These could both be done, yes.  My revised patch doesn't implement
these ideas (it just does the simpler fix), but they might be nice
add-ons.




^ permalink raw reply	[flat|nested] 47+ messages in thread

* Re: The Emacs Calculator and calendar
  2012-10-13  6:02                   ` Paul Eggert
@ 2012-10-13 14:05                     ` Jay Belanger
  0 siblings, 0 replies; 47+ messages in thread
From: Jay Belanger @ 2012-10-13 14:05 UTC (permalink / raw
  To: emacs-devel; +Cc: jay.p.belanger


>> The patch makes the Gregorian calendar the only choice for Calc, though,
>> not just the default.  It should be configurable
...
> These could both be done, yes.  My revised patch doesn't implement
> these ideas (it just does the simpler fix), but they might be nice
> add-ons.

More than a nice add-on, I think configurability is an important
feature.  Compatibility with Calendar can be done without losing the
current way of dealing with dates (which some people are used to) and
even gaining new ways.




^ permalink raw reply	[flat|nested] 47+ messages in thread

end of thread, other threads:[~2012-10-13 14:05 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-05 19:13 The Emacs Calculator and calendar Jay Belanger
2012-10-05 19:24 ` Paul Eggert
2012-10-05 20:51 ` Edward Reingold
2012-10-05 21:14   ` Pascal J. Bourguignon
2012-10-06 15:41   ` Richard Stallman
2012-10-06 22:07     ` Paul Eggert
2012-10-07  3:49       ` Richard Stallman
2012-10-07  6:22         ` Paul Eggert
2012-10-07 17:30           ` Richard Stallman
2012-10-07 18:23             ` Paul Eggert
2012-10-10  3:37               ` Richard Stallman
2012-10-07  6:36       ` Eli Zaretskii
2012-10-07  7:50         ` Paul Eggert
2012-10-07  8:45           ` Eli Zaretskii
2012-10-07 13:01             ` Juanma Barranquero
2012-10-07 14:08               ` Eli Zaretskii
2012-10-07 17:30           ` Richard Stallman
2012-10-07 17:57             ` Juanma Barranquero
2012-10-07 21:55         ` Sam Steingold
2012-10-08 13:39           ` Richard Stallman
2012-10-07  8:17       ` Stephen J. Turnbull
2012-10-07  7:56     ` Achim Gratz
2012-10-07  8:44       ` Eli Zaretskii
2012-10-07 13:57         ` Stefan Monnier
2012-10-07 20:32           ` Paul Eggert
2012-10-07 21:34             ` Tim Cross
2012-10-08  0:32             ` Stefan Monnier
2012-10-08  6:30               ` Paul Eggert
2012-10-08  7:28                 ` Ulrich Mueller
2012-10-08 13:56                   ` Stefan Monnier
2012-10-08 14:49                     ` Jay Belanger
2012-10-08  8:21                 ` James Cloos
2012-10-08 14:59                 ` Jay Belanger
2012-10-13  6:02                   ` Paul Eggert
2012-10-13 14:05                     ` Jay Belanger
2012-10-08 13:39             ` Richard Stallman
2012-10-08 19:34               ` Paul Eggert
2012-10-08 22:39                 ` Richard Stallman
2012-10-09  6:28                   ` Paul Eggert
2012-10-09 15:47                     ` Richard Stallman
2012-10-09 23:10                       ` Paul Eggert
2012-10-10  2:22                         ` Jay Belanger
2012-10-11 12:09                           ` Jason Rumney
2012-10-12  1:52                             ` Richard Stallman
2012-10-10  3:37                         ` Richard Stallman
2012-10-10 21:42                   ` Christoph Herzog
2012-10-05 21:17 ` Edward Reingold

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.