[texhax] Time calculations within LaTeX?
Richard Hartmann
richih.mailinglist at gmail.com
Sat Feb 9 12:11:55 CET 2008
On Feb 9, 2008 6:56 AM, E. Krishnan <ekmath at asianetindia.com> wrote:
> Then \timediff10:15-16:00 gives 5.75 and \timediff10:15-01:00 gives 14.75.
I found two issues with the function, one of which I could fix :)
You need to reinitialize dh, dm, hrdec for the function to give the correct
result when called more than once in a tex file.
\setcounter{dh}{0}
\setcounter{dm}{0}
\setcounter{hrdec}{0}
does the trick.
The other issue is that when the minute or hour values are equal, you
get a null result, no matter what the other parameter is. It seems there
is not handling for the minutes being equal in the code, so I am trying to
make this fly, atm.
Thanks again,
Richard
More information about the texhax
mailing list