Bug 10331 - cal program won't accept years after 9999
Summary: cal program won't accept years after 9999
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: util-linux
Version: 6.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Crutcher Dunnavant
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-03-24 20:38 UTC by Brad Garcia
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2000-03-24 20:38:49 UTC
Embargoed:


Attachments (Terms of Use)

Description Brad Garcia 2000-03-24 20:38:49 UTC
Why shouldn't the cal program show years 10000 onward?

> cal 1 10000
cal: illegal year value: use 1-9999

Comment 1 Jeff Johnson 2000-10-09 16:46:51 UTC
Do you really care?

Comment 2 Brad Garcia 2000-10-09 18:29:05 UTC
I cared enough to file a bug,
but I won't lose any sleep if it doesn't get fixed.

It just seems like a completely arbitrary limitation.  I can find no reason
for it.  The mathematics are the same past the year 9999.  The type-imposed
limit for year appears to be (((MAX_LONG - 379) * 400 / 146097) + 1),
or 5879610 for a 32-bit long.  This limitation occurs in the day_in_week()
function.

I tried removing the artificial limitation and it appears to give
correct results.



Note You need to log in before you can comment on or make changes to this bug.