DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T d

⟦f273f2fdf⟧ TextFile

    Length: 1220 (0x4c4)
    Types: TextFile
    Names: »dow.tex«

Derivation

└─⟦060c9c824⟧ Bits:30007080 DKUUG TeX 2/12/89
    └─⟦this⟧ »./DVIware/laser-setters/umd-dvi/doc/dow.tex« 

TextFile

% From: minow@decvax.UUCP (Martin Minow)
%
% \DayOfWeek	expands to the day of the week ("Sunday", etc.)
%
\newcount\dow
\def\DayOfWeek{\ifcase\dow Sunday\or Monday\or Tuesday\or Wednesday\or
    Thursday\or Friday\or Saturday\fi}

%
% Calculate day of the week (0=Sunday, 1=Monday, etc.), result
% into \dow.
%
{ \countdef\leap=1			% Leap year fingaler
  \countdef\x=2				% Temp register
  \countdef\y=3 			% Another temp register
%		leap = year + (month - 14)/12;
  \leap=\month \advance\leap by -14 \divide\leap by 12 \advance\leap by \year
%		dow = (13 * (month + 10 - (month + 10)/13*12) - 1)/5
  \dow=\month \advance\dow by 10 \y=\dow \divide\y by 13 \multiply\y by 12
  \advance\dow by -\y \multiply\dow by 13 \advance\dow by -1 \divide\dow by 5
%		dow += day + 77 + 5 * (leap % 100)/4
  \advance\dow by \day \advance\dow by 77
  \x=\leap \y=\x \divide\y by 100 \multiply\y by 100 \advance\x by -\y
  \multiply \x by 5 \divide\x by 4 \advance\dow by \x
%		dow += leap / 400
  \x=\leap \divide\x by 400 \advance\dow by \x
%		dow -= leap / 100 * 2;
%		dow = (dow % 7)
  \x=\leap \divide\x by 100 \multiply\x by 2 \advance\dow by -\x
  \x=\dow \divide\x by 7 \multiply\x by 7 \advance\dow by -\x
  \global\dow=\dow
}