%Cas vytvorenia dokumentu v ludskom formate
%-----------------------------------
%11.07.2003
% + opravena chyba pri leading zeros v minutach, teraz
%   sa spravne vytlaci napr. 12:08 (predtym len 12:8)
%23.05.2003
%makro, ktore vrati cas kompilacie dokumentu v tvare H:M
%inspirovane TBN, p.81
\newcount\minutes %register typu <number>
\newcount\hours %dalsi register <number>
\def\timeHM{%
  \minutes=\time %poznacime si akt. cas od polnoci v minutach
  \hours=\time %este raz
  \divide\minutes by 60 %zistime hodiny celociselnym delenim
  \hours=\minutes %odlozime si minuty
  \multiply\hours by 60 %vynasobime minuty 60
  \advance\hours by -\time %tymto zistime zvysok po celociselnom deleni (ten je zaporny)
  \multiply\hours by-1 %vyrobime kladny zvysok
  %pozor, teraz su "hours" minuty a "minutes" hodiny
  %osetrime pripad typu 12:8 - prevedieme na 12:08
  \ifnum\hours<10
    \the\minutes:0\the\hours%  
  \else
    \the\minutes:\the\hours%  
  \fi
}%

Dokument bol vytvoreny o \timeHM.

\bye