Bug 8535 - Y2K bug in LaTeX class file
Summary: Y2K bug in LaTeX class file
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: tetex
Version: 5.2
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-01-17 13:38 UTC by redhat
Modified: 2008-05-01 15:37 UTC (History)
0 users

(edit)
Clone Of:
(edit)
Last Closed: 2000-01-17 15:29:21 UTC


Attachments (Terms of Use)

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.


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