Util-Linux package development
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: Adam Sampson <ats@offog.org>
Cc: util-linux@vger.kernel.org
Subject: Re: v2.32 cal(1)
Date: Wed, 20 Dec 2017 18:42:41 +0100	[thread overview]
Message-ID: <20171220174241.7n4szla6vxwv3fum@ws.net.home> (raw)
In-Reply-To: <y2amv2ds6q0.fsf@offog.org>

On Wed, Dec 20, 2017 at 04:29:43PM +0000, Adam Sampson wrote:
> Karel Zak <kzak@redhat.com> writes:
> 
> > The problem is that year 1752 is very specific to British Empire and
> > for example Catholic Europe moved to the Gregorian calendar in year
> > 1582.
> ...
> > * later (after warning in release notes) we can make --gregorian as
> >   the default
> 
> The date of cal's switch is specified in POSIX as 1752, though:
> http://pubs.opengroup.org/onlinepubs/9699919799/utilities/cal.html
> (with a note that future versions may make this depend on the locale).

It sounds like too complicated semantic to depend on locale. Don't
also forget that switch from one calendar to another means extra
calculation (for example skip 11 days for British Empire way, etc).

> So if the default is changed, it would be worth noting the deviation
> from POSIX in the man page, and maybe even defaulting to the old

Good point.

> behaviour if POSIXLY_CORRECT is defined, as, e.g., coreutils does for
> other bits of dubious but mandated behaviour.
> 
> I wonder if it might be more helpful just to report an error if cal is
> run for a year prior to 1926 without explicitly specifying which
> calendar to use?

I think we can follow the current default behavior for ever, and just
add --iso/--gregorian for people who care.

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

  reply	other threads:[~2017-12-20 17:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-19 13:29 v2.32 cal(1) Karel Zak
2017-12-20  2:32 ` [PATCH] cal: add --iso and --1782-reform format options J William Piggott
2017-12-21 14:13   ` Karel Zak
2017-12-21 17:33     ` J William Piggott
2017-12-20 16:29 ` v2.32 cal(1) Adam Sampson
2017-12-20 17:42   ` Karel Zak [this message]
2017-12-21  2:43     ` J William Piggott

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171220174241.7n4szla6vxwv3fum@ws.net.home \
    --to=kzak@redhat.com \
    --cc=ats@offog.org \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox