Bug 10331

Summary: cal program won't accept years after 9999
Product: [Retired] Red Hat Linux Reporter: Brad Garcia <garsh>
Component: util-linuxAssignee: Crutcher Dunnavant <crutcher>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1Keywords: FutureFeature
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-03-24 20:38:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.