summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/datetime2-contrib/datetime2-italian/sample/datetime2-sample-hyperref.tex
blob: 5ee79e91f589951d4a8157bcc3ad1637647be2d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
% This file is public domain.
% This document additionally requires the datetime2-english module
% to be installed.

% arara: pdflatex
% arara: pdflatex
\documentclass[italian]{article}

\usepackage[datesep=/,showzoneminutes=false]{datetime2}
\usepackage[colorlinks]{hyperref}

\DTMsetup{showdow}

\DTMsavetimestamp{mydate}{2014-06-03T12:45:02+01:00}

\begin{document}
\tableofcontents

The use of \verb|\typeout| is to test the expansion in the event
that the date/time needs to be written to an external file.
Use
\texttt{\href{http://www.dickimaw-books.com/latex/novices/html/texdoc.html}{texdoc} datetime2} to read the main user manual for
the \texttt{datetime2} package and use \texttt{texdoc
datetime2-english} for the English module documentation.

\section{Default date: \today}

Today: \today. Time: \DTMcurrenttime. Zone: \DTMcurrentzone.

Now: \DTMnow.

TWO DIGITS: \DTMtwodigits{2014}. \DTMtwodigits{2999}.
\DTMtwodigits{-2}.

\typeout{Date Stamp (Default): \DTMnow}

Saved date: \DTMusedate{mydate}.
Saved time: \DTMusetime{mydate}.

Saved date-time: \DTMuse{mydate}.

\typeout{Date Stamp (Default): \DTMuse{mydate}}

\section{Default time: \DTMusetime{mydate}}

\DTMsetstyle{iso}

ISO: \DTMnow.
\typeout{Date Stamp (ISO): \DTMnow}

Saved date: \DTMuse{mydate}.
\typeout{Date Stamp (ISO): \DTMuse{mydate}}

\DTMsetstyle{italian}
\section{(Italiano) \DTMusedate{mydate}}
Today: \today. Time: \DTMcurrenttime. Zone: \DTMcurrentzone.

Now: \DTMnow.

TWO DIGITS: \DTMtwodigits{2014}. \DTMtwodigits{2999}.
\DTMtwodigits{-2}.

\typeout{Date Stamp (Default): \DTMnow}

Saved date: \DTMusedate{mydate}.
Saved time: \DTMusetime{mydate}.

Saved date-time: \DTMuse{mydate}.

Italiano: \DTMnow.
\typeout{Date Stamp (IT): \DTMnow}

Saved date: \DTMuse{mydate}.
\typeout{Date Stamp (IT): \DTMuse{mydate}}



\end{document}