Created
May 23, 2012 10:05
-
-
Save slivingston/2774377 to your computer and use it in GitHub Desktop.
LaTeX code to generate timestamp; the resulting command is \now
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% Code to create a timestamp. The resulting command is \now | |
%% | |
%% SCL; 30 May 2012 | |
\newcount\hour \newcount\minute | |
\hour=\time \divide \hour by 60 | |
\minute=\time | |
\loop \ifnum \minute > 59 \advance \minute by -60 \repeat | |
\def\now{\number\year% | |
-{\ifnum \month < 10 0\fi}\number\month% | |
-{\ifnum \day < 10 0\fi}\number\day% | |
~{\ifnum \hour < 10 0\fi}\number\hour% | |
:{\ifnum \minute < 10 0\fi}\number\minute} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment