| 1 |
\documentclass[italian]{article} |
| 2 |
\newcount\myct |
| 3 |
\newcount\datecount |
| 4 |
\newcommand{\tomorrow}{% |
| 5 |
\DTMsavenow{mydate} |
| 6 |
\DTMsaveddateoffsettojulianday{mydate}{365}{\myct} |
| 7 |
\DTMsavejulianday{mydate}{\number\myct} |
| 8 |
\DTMusedate{mydate} |
| 9 |
} |
| 10 |
|
| 11 |
\newcommand{\yesterday}{% |
| 12 |
\DTMsavenow{mydate} |
| 13 |
\DTMsaveddateoffsettojulianday{mydate}{-1}{\myct} |
| 14 |
\DTMsavejulianday{mydate}{\number\myct} |
| 15 |
\DTMusedate{mydate} |
| 16 |
} |
| 17 |
\newcommand{\myday}[1]{% |
| 18 |
\DTMsavenow{mydate} |
| 19 |
\DTMsaveddateoffsettojulianday{mydate}{#1}{\myct} |
| 20 |
\DTMsavejulianday{mydate}{\number\myct} |
| 21 |
\DTMusedate{mydate} |
| 22 |
} |
| 23 |
\usepackage[calc,useregional]{datetime2} |
| 24 |
\begin{document} |
| 25 |
|
| 26 |
\today~ is the day before tomorrow.\par |
| 27 |
|
| 28 |
\tomorrow~ is the day after today. |
| 29 |
|
| 30 |
\yesterday |
| 31 |
|
| 32 |
\myday{10} |
| 33 |
%\DTMuse{\tomorrow} |
| 34 |
%\pgfcalendardatetojulian{\year-\month-\day+1}{\pgfdatecount} |
| 35 |
%\DTMsavejulianday{mydate}{\the\pgfdatecount} |
| 36 |
%\DTMusedate{mydate} |
| 37 |
|
| 38 |
|
| 39 |
\end{document} |