| 1 |
% This file is public domain. |
| 2 |
|
| 3 |
% arara: pdflatex |
| 4 |
% May also work with lualatex on some platforms (such as Linux) |
| 5 |
% but the file mod date is not supported with xelatex. |
| 6 |
% (The time zone %z format with Lua may not work on some platforms.) |
| 7 |
% arara: pdflatex |
| 8 |
\documentclass{article} |
| 9 |
|
| 10 |
\usepackage{datetime2} |
| 11 |
|
| 12 |
\begin{document} |
| 13 |
Current date and time: \DTMnow. |
| 14 |
|
| 15 |
\DTMsavefilemoddate{filemod}{\jobname.tex} |
| 16 |
|
| 17 |
File modification date: \DTMuse{filemod}. |
| 18 |
|
| 19 |
Save current date and time. |
| 20 |
\DTMsavenow{mydate} |
| 21 |
|
| 22 |
Now use it: \DTMuse{mydate}. |
| 23 |
\end{document} |