summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/datetime2-contrib/datetime2-german/datetime2-german-base.dtx
blob: 7651fe0ada8266e06e72b648bd8c73d7ad3bf0c6 (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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
%\iffalse
%<*package>
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
%</package>
%
% Doc-Source file to use with LaTeX2e
% Copyright (C) 2015 Nicola Talbot, all rights reserved.
% Copyright (C) 2017-19 Sebastian Friedl, all rights reserved.
% \fi
%
% 
%
% \subsection{Engine-independent code: \texttt{datetime2-german-base.ldf}}
%
% \changes{1.0}{2015-03-27}{Initial release}
%
% \medskip
% Identify module
%    \begin{macrocode}
\ProvidesDateTimeModule{german-base}[2019/12/13 v3.0]
%    \end{macrocode}
%
%\begin{macro}{\DTMgermanordinal}
% Ordinals used for printing the day of month.
%    \begin{macrocode}
\newcommand*{\DTMgermanordinal}[1]{%
    \number#1 
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMgermanweekdayname}
% Weekday names.
%    \begin{macrocode}
\newcommand*{\DTMgermanweekdayname}[1]{%
  \ifcase#1
  Montag%
  \or
  Dienstag%
  \or
  Mittwoch%
  \or
  Donnerstag%
  \or
  Freitag%
  \or
  Samstag%
  \or
  Sonntag%
  \fi
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMgermanshortweekdayname}
% Abbreviated weekday names.
%\changes{1.2}{2017-09-10}{Implemented short weekday names}
%\changes{2.0}{2017-10-03}{Fixed short weekday names}
%    \begin{macrocode}
\newcommand*{\DTMgermanshortweekdayname}[1]{%
  \ifcase#1
  Mo%
  \or
  Di%
  \or
  Mi%
  \or
  Do%
  \or
  Fr%
  \or
  Sa%
  \or
  So%
  \fi
}
%    \end{macrocode}
%\end{macro}
%
%\begin{macro}{\DTMgermanzonemaps}
% The time zone mappings are set through this command, which can be
% redefined if extra mappings are required or mappings need to be
% removed.
%\changes{1.2}{2017-09-10}{Use German time zone names (ME[S]Z)}
%    \begin{macrocode}
\newcommand*{\DTMgermanzonemaps}{%
  \DTMdefzonemap{01}{00}{MEZ}%
  \DTMdefzonemap{02}{00}{MESZ}%
}
%    \end{macrocode}
%\end{macro}
%
% Load engine-dependent code. \\
% \hologo{XeTeX} and \hologo{LuaTeX} natively support UTF-8, so the "german-base-utf8"
% module is loaded if either of those engines are used. \\
% Otherwise, the "german-base-ascii" module is loaded.
%    \begin{macrocode}
\RequirePackage{ifxetex, ifluatex}
\ifxetex
  \RequireDateTimeModule{german-base-utf8}
\else
  \ifluatex
    \RequireDateTimeModule{german-base-utf8}
  \else
    \RequireDateTimeModule{german-base-ascii}
  \fi
\fi
%    \end{macrocode}
%
\endinput