Article View: comp.text.tex
Article #2628Re: A macro for giving the current time of day.
From: Donald Arseneau
Date: Sat, 22 Aug 1992 09:41
Date: Sat, 22 Aug 1992 09:41
27 lines
1534 bytes
1534 bytes
In article <dak.714391046@kaa>, dak@kaa.informatik.rwth-aachen.de (David Kastrup) writes...
>dfarrow@spam.ua.oz (Duncan Farrow) writes:
>
>>Dear TeXers, here is a macro for producing the current time ...
>Corrected:
...
>% there is one backslash missing. Besides, why not
> \ifnum\time>719\chardef\a=p\else\chardef\a=p\fi %Check to see if it is pm
^
This should be "a", right? ------------------------!
> \ifnum\hour>12\advance\hour by -12\advance\minute by -720\fi
> \number\hour:%
Need a space: by-720 \fi , or -720\relax\fi.
Otherwise, for hour=14, the expansion is
\advance \hour by -12\advance \minute by -7202:
> \multiply\hour by 60 %Use is made of the integer divide here.
> \advance\minute by -\hour
> \ifnum\minute<10 0\fi\number\minute\a m\fi}
>
Now use \time to draw a clock face using a LaTeX {picture}.
Donald
Technical Details
Message-ID:
<22AUG199202415267@reg.triumf.ca>Path:
arc1-ca.pugleaf.net!sparky!uunet!decwrl!access.usask.ca!kakwa.ucs.ualberta.ca!unixg.ubc.ca!reg.triumf.ca!asndReferences:
<1676@spam.ua.oz> <dak.714391046@kaa>Show Full Headers
Complete Article Headers
Newsgroups: comp.text.tex Path: arc1-ca.pugleaf.net!sparky!uunet!decwrl!access.usask.ca!kakwa.ucs.ualberta.ca!unixg.ubc.ca!reg.triumf.ca!asnd From: asnd@reg.triumf.ca (Donald Arseneau) Subject: Re: A macro for giving the current time of day. Message-ID: <22AUG199202415267@reg.triumf.ca> News-Software: VAX/VMS VNEWS 1.41 Sender: news@unixg.ubc.ca (Usenet News Maintenance) Nntp-Posting-Host: reg.triumf.ca Organization: TRIUMF: Tri-University Meson Facility References: <1676@spam.ua.oz> <dak.714391046@kaa> Date: Sat, 22 Aug 1992 09:41:00 GMT Lines: 27