Q: \time command?
Nelson H. F. Beebe
beebe at math.utah.edu
Fri Apr 12 12:00:16 CEST 2002
Andreas Hadjiprocopis <livantes at soi.city.ac.uk> asks on
Thu, 11 Apr 2002 10:32:40 +0100 (BST)
>> I was wondering whether the \today command may be adjusted so as to
>> give me the current time as well...
Instead of the \today command, use the \time command.
Here is a solution lifted from a style file that I've used for years
to get a timestamp in typeset letters:
% ----------------------------------------------------------------------
%
% TIME OF DAY
%
\newcount\hh
\newcount\mm
\mm=\time
\hh=\time
\divide\hh by 60
\divide\mm by 60
\multiply\mm by 60
\mm=-\mm
\advance\mm by \time
\def\hhmm{\number\hh:\ifnum\mm<10{}0\fi\number\mm}
Use it like this in a LaTeX document:
\date{\today{ }\hhmm}
-------------------------------------------------------------------------------
- Nelson H. F. Beebe Tel: +1 801 581 5254 -
- Center for Scientific Computing FAX: +1 801 585 1640, +1 801 581 4148 -
- University of Utah Internet e-mail: beebe at math.utah.edu -
- Department of Mathematics, 110 LCB beebe at acm.org beebe at computer.org -
- 155 S 1400 E RM 233 beebe at ieee.org -
- Salt Lake City, UT 84112-0090, USA URL: http://www.math.utah.edu/~beebe -
-------------------------------------------------------------------------------
More information about the texhax
mailing list