summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/filemod/filemod-expmin.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-03-23 22:59:55 +0000
committerKarl Berry <karl@freefriends.org>2011-03-23 22:59:55 +0000
commit83266032c26012f162e65d1177e5d3f77eee458e (patch)
tree2cdd8e9b26d56930bee05afadc62c902f54762af /Master/texmf-dist/tex/latex/filemod/filemod-expmin.sty
parent5b837f1b12aa8f8ef27aa5c080af28e446f97263 (diff)
new latex package filemod (23mar11)
git-svn-id: svn://tug.org/texlive/trunk@21813 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/filemod/filemod-expmin.sty')
-rw-r--r--Master/texmf-dist/tex/latex/filemod/filemod-expmin.sty55
1 files changed, 55 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/filemod/filemod-expmin.sty b/Master/texmf-dist/tex/latex/filemod/filemod-expmin.sty
new file mode 100644
index 00000000000..beae7a20b60
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/filemod/filemod-expmin.sty
@@ -0,0 +1,55 @@
+%% Copyright (C) 2011 by Martin Scharrer <martin@scharrer-online.de>
+%% ---------------------------------------------------------------------------
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Martin Scharrer.
+%%
+%% This work consists of the files filemod.dtx and filemod.ins
+%% and the derived filebase filemod.sty.
+\ProvidesPackage{filemod-expmin}[%
+ 2011/03/23 v1.0
+ Get and compare file modification times (expandable; minimal)]
+\begingroup
+\@makeother\D
+\@makeother\Z
+\@makeother:
+\gdef\filemodNumdate#1{%
+ \expandafter\filemod@Numdate\pdffilemoddate{#1}D:00000000000000Z\relax
+}
+\gdef\filemod@Numdate D:#1#2#3#4#5#6#7#8#9\relax{%
+ #1#2#3#4#5#6#7#8%
+}
+\gdef\filemodNumtime#1{%
+ \expandafter\filemod@Numtime\pdffilemoddate{#1}D:00000000000000Z\relax
+}
+\gdef\filemod@Numtime D:#1#2#3#4#5#6#7#8#9\relax{%
+ \filemod@@Numtime#9\relax
+}
+\gdef\filemod@@Numtime#1#2#3#4#5#6#7\relax{%
+ #1#2#3#4#5#6%
+}
+\endgroup
+\newcommand*\filemodCmp[2]{%
+ \ifcase0%
+ \ifnum\filemodNumdate{#2}>\filemodNumdate{#1} 1\else
+ \ifnum\filemodNumdate{#2}=\filemodNumdate{#1} %
+ \ifnum\filemodNumtime{#2}>\filemodNumtime{#1} 1\fi
+ \fi
+ \fi
+ \space
+ \expandafter\@firstoftwo
+ \or
+ \expandafter\@secondoftwo
+ \fi
+}
+\endinput
+%%
+%% End of file `filemod-expmin.sty'.