Util-Linux package development
 help / color / mirror / Atom feed
* bug in the cal
@ 2015-11-27 14:22 Evgenii Sovetkin
  2015-11-27 17:19 ` Ángel González
  0 siblings, 1 reply; 3+ messages in thread
From: Evgenii Sovetkin @ 2015-11-27 14:22 UTC (permalink / raw)
  To: util-linux

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

Hello everyone,

just noticed a funny behaviour of the cal program...

% cal -n2
Produces calendar for November and December.

% cal -n3
Produces calendar for October, November and December.

% cal -n4
Produces calendar for November, December, January and February.

I don't think it is the expected output. The version of cal is from
util-linux 2.27.



Kind regards,

Jenya

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: bug in the cal
  2015-11-27 14:22 bug in the cal Evgenii Sovetkin
@ 2015-11-27 17:19 ` Ángel González
  2015-11-28  0:15   ` Karel Zak
  0 siblings, 1 reply; 3+ messages in thread
From: Ángel González @ 2015-11-27 17:19 UTC (permalink / raw)
  To: Evgenii Sovetkin; +Cc: util-linux

On 27/11/15 15:22, Evgenii Sovetkin wrote:
> Hello everyone,
>
> just noticed a funny behaviour of the cal program...
>
> % cal -n2
> Produces calendar for November and December.
>
> % cal -n3
> Produces calendar for October, November and December.
>
> % cal -n4
> Produces calendar for November, December, January and February.
>
> I don't think it is the expected output. The version of cal is from
> util-linux 2.27.

Thanks for your report, Evgenii.

The man page says:
>        -n , --months number
>               Display number of months, starting from the month containing the date.

So the problem is that
 > cal -n 3
 > cal --months 3

is acting as
 > cal -3


Maybe the command line parser is getting a bit confused.


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

* Re: bug in the cal
  2015-11-27 17:19 ` Ángel González
@ 2015-11-28  0:15   ` Karel Zak
  0 siblings, 0 replies; 3+ messages in thread
From: Karel Zak @ 2015-11-28  0:15 UTC (permalink / raw)
  To: Ángel González; +Cc: Evgenii Sovetkin, util-linux

On Fri, Nov 27, 2015 at 06:19:20PM +0100, Ángel González wrote:
> So the problem is that
> > cal -n 3
> > cal --months 3
> 
> is acting as
> > cal -3

 Already fixed in git three.

    Karel

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

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

end of thread, other threads:[~2015-11-28  0:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-27 14:22 bug in the cal Evgenii Sovetkin
2015-11-27 17:19 ` Ángel González
2015-11-28  0:15   ` Karel Zak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox