Bug 8535

Summary: Y2K bug in LaTeX class file
Product: [Retired] Red Hat Linux Reporter: redhat
Component: tetexAssignee: Tim Waugh <twaugh>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 5.2   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-01-17 15:29:21 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 redhat 2000-01-17 13:38:14 UTC
The class file /usr/share/texmf/tex/latex/dinbrief/dinbrief.cls
(tetex-latex-0.9-6.i386.rpm) calculates a date in the form DD.MM.YY.
Since 1.1.2000 the YY is shown as 100, because it subtracts 1900
from the current year instead dividing it modulo 100.

Comment 1 Jeff Johnson 2000-01-17 15:29:59 UTC
This problem is still preset in tetex-1.0.6:

\def\today{\number\day.\space\ifcase\month\or
  Januar\or Februar\or M\"arz\or April\or Mai\or Juni\or
  Juli\or August\or September\or Oktober\or November\or Dezember\fi
  \space\number\year}
\newcount\yearcnt
\yearcnt=\year
\advance\yearcnt-\number1900
\def\@znumber#1{\ifnum\number#1<10 0\number#1\else\number#1\fi}
\def\ntoday{\@znumber{\number\day}.%
            \@znumber{\number\month}.%
            \@znumber{\the\yearcnt}}
\def\@ntoday{\ntoday}

Comment 2 Trond Eivind Glomsrxd 2000-12-01 22:56:23 UTC
It is fixed in the one shipping with Red Hat Linux 7 (possibly earlier, but at
least that one) - no mention of 1900 at all.