summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/koma-script/scrdate.sty
blob: 5827f5b95792e584166e1a180e585d93c33ab4e2 (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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
%%
%% This is file `scrdate.sty',
%% generated with the docstrip utility, extended by scrdocstrip.
%%
%% The original source files were:
%%
%% scrkernel-version.dtx  (with options: `package,scrdate')
%% scrtime.dtx  (with options: `package,scrdate,identify')
%% scrkernel-basics.dtx  (with options: `load')
%% scrtime.dtx  (with options: `package,scrdate,option')
%% scrtime.dtx  (with options: `package,scrdate,body')
%% scrlogo.dtx  (with options: `logo')
%% 
%% Copyright (c) 1994-2016 Markus Kohm [komascript at gmx info]
%% 
%% This file was generated from file(s) of the KOMA-Script bundle.
%% ---------------------------------------------------------------
%% 
%% It may be distributed under the conditions of the
%% LaTeX Project Public License in the version distributed together
%% with KOMA-Script, see file `lppl.txt' or `lppl-de.txt'.
%% 
%% This file may only be distributed together with a copy of the
%% KOMA-Script bundle.  You may however distribute the
%% KOMA-Script bundle without all such generated files.  See also
%% `lppl.txt' or `lppl-de.txt' for additional information.
%% 
%% The list of files belonging to KOMA-Script distribution is given in
%% the file `manifest.txt'.  See also `lppl.txt' or `lppl-de.txt' for
%% additional information.
%% 
%% If this file is a beta version, you may not be allowed to distribute
%% it.  Look at the comments below to see if this is the case.
%% 
%% English and German manuals are part of KOMA-Script bundle.
%% ----------------------------------------------------------
%% 
%% See `README'.
%% 
%% The KOMA-Script bundle (but maybe not this file) was based upon the
%% LaTeX 2.09 Script family created by Frank Neukam 1993 and the LaTeX2e
%% standard classes created by The LaTeX3 Project 1994-1996.  You may
%% find a complete unmodified copy of LaTeX2e at
%% <http://www.ctan.org/pub/tex-archive/macros/latex/base/>.
%% 
%%% From File: $Id: scrkernel-version.dtx 2491 2016-07-29 08:03:57Z kohm $
\begingroup
  \catcode`\@11\relax
  \ifx\KOMAScriptVersion\undefined
    \newcommand*{\@CheckKOMAScriptVersion}[1]{%
      \gdef\KOMAScriptVersion{#1}%
    }%
  \else
    \newcommand*{\@CheckKOMAScriptVersion}[1]{%
      \def\@tempa{#1}%
      \ifx\KOMAScriptVersion\@tempa\else
        \@latex@warning@no@line{%
          \noexpand\KOMAScriptVersion\space is
          `\KOMAScriptVersion',\MessageBreak
          but `#1' was expected!\MessageBreak
          You should not use classes, packages or files
          from\MessageBreak
          different KOMA-Script versions%
        }%
      \fi
    }
  \fi
  \@CheckKOMAScriptVersion{2017/01/03 v3.22 KOMA-Script}%
\endgroup
\providecommand*{\scr@pkgextension}{\@pkgextension}
\AtBeginDocument{%
  \let\scr@pkgextension\@pkgextension
}
%%% From File: $Id: scrtime.dtx 2429 2016-04-12 12:10:19Z kohm $
\NeedsTeXFormat{LaTeX2e}[1995/06/01]
\ProvidesPackage{scrdate}[%
  2017/01/03 v3.22 KOMA-Script
  package
  (day of the week)%
]
%%% From File: $Id: scrkernel-basics.dtx 2490 2016-07-29 06:29:45Z kohm $
\RequirePackage{scrkbase}[\KOMAScriptVersion]
%%% From File: $Id: scrtime.dtx 2429 2016-04-12 12:10:19Z kohm $
%%% From File: $Id: scrtime.dtx 2429 2016-04-12 12:10:19Z kohm $
\newcommand*{\CenturyPart}[1]{\XdivY{#1}{100}}
\newcommand*{\DecadePart}[1]{\XmodY{#1}{100}}
\newcommand*{\@GaussYear}[3]{%
  \ifcase #2
    \PackageError{scrdate}{month out of range}{%
      You've asked for the Gauss year of ISO date #1-#2-#3,\MessageBreak
      this means, that month hat invalid value '#2'.}%
  \or
    \numexpr #1 - 1\relax
  \or
    \numexpr #1 - 1\relax
  \else
    #1
  \fi
}
\newcommand*{\DayNumber}[3]{%
  \XmodY{%
    \numexpr #3
           + \ifcase #2
               \PackageError{scrdate}{month out of range}{%
                 You've asked for the dayname of ISO date #1-#2-#3,\MessageBreak
                 this means, that month hat invalid value '#2'.}%
             \or 28 \or 31 \or 2 \or 5 \or 7 \or 10 \or 12 \or 15 \or 18
             \or 20 \or 23 \or 25
             \else
               \PackageError{scrdate}{month out of range}{%
                 You've asked for the dayname of ISO date #1-#2-#3,\MessageBreak
                 this means, that month hat invalid value '#2'.}%
             \fi
           + \DecadePart{\@GaussYear{#1}{#2}{#3}}
           + \XdivY{\DecadePart{\@GaussYear{#1}{#2}{#3}}}{4}
           + \XdivY{\CenturyPart{\@GaussYear{#1}{#2}{#3}}}{4}
           - 2 * \CenturyPart{\@GaussYear{#1}{#2}{#3}} \relax
  }{7}%
}
\newcommand*{\ISODayNumber}[1]{\expandafter\@IsoDayNumber#1\@nil}
\newcommand*{\@IsoDayNumber}{}
\def\@IsoDayNumber#1-#2-#3\@nil{\DayNumber{#1}{#2}{#3}}
\newcommand*{\DayName}[3]{\@dayname{\DayNumber{#1}{#2}{#3}}}
\newcommand*{\ISODayName}[1]{\@dayname{\ISODayNumber{#1}}}
\newcommand*{\DayNameByNumber}[1]{%
  \@dayname{\XmodY{#1}{7}}%
}
\newcommand*{\ISOToday}{%
  \the\year-\ifnum \month<10 0\fi\the\month-\ifnum \day<10 0\fi\the\day%
}
\newcommand*{\IsoToday}{%
  \the\year-\the\month-\the\day%
}
\newcommand*{\todaysname}{\DayName{\year}{\month}{\day}}
\newcommand*{\todaysnumber}{\DayNumber{\year}{\month}{\day}}
\newcommand\nameday[1]{\renewcommand*{\todaysname}{#1}}
\newcommand*\scrdate@languagenamewarning{%
  \PackageWarningNoLine{scrdate}
    {\string\languagename\space not
     defined, using \string\language.\MessageBreak
     This may result in use of wrong language!\MessageBreak
     You should use a compatible language
     package\MessageBreak
     (e.g. `babel', `german', `french', ...)}%
  \let\scrdate@languagenamewarning\relax
}
\newcommand\newdaylanguage[8]{%
  \scr@ifundefinedorrelax{l@#1}{%
    \PackageInfoNoLine{scrdate}{Language #1\space not defined.\MessageBreak
                                \protect\dayname@#1\space skipped}%
  }{%
    \@namedef{dayname@#1}##1{%
        \ifcase\numexpr \XmodY{##1}{7}\relax
          #8\or #2\or #3\or #4\or #5\or #6\or #7\fi%
    }%
    \AtBeginDocument{%
      \scr@ifundefinedorrelax{date#1}{%
        \PackageInfoNoLine{scrdate}
                          {\protect\date#1\space not defined.\MessageBreak
                           \protect\todaysname\space probably cannot use
                           \protect\dayname@#1}%
      }{%
        \expandafter\let\csname D@date#1\expandafter\endcsname
                        \csname date#1\endcsname
        \@namedef{date#1}{%
          \expandafter\let\expandafter\@dayname\csname dayname@#1\endcsname
          \@nameuse{D@date#1}}%
        \@ifundefined{languagename}{%
          \scrdate@languagenamewarning
          \ifnum\language=\@nameuse{l@#1}
            \@nameuse{date#1}%
          \fi
        }{%
          \@ifundefined{date\languagename}%
            {}%
            {\@nameuse{date\languagename}}%
        }%
      }%
    }%
  }%
}
\newdaylanguage{german}{Montag}{Dienstag}{Mittwoch}
               {Donnerstag}{Freitag}{Samstag}{Sonntag}
\newdaylanguage{ngerman}{Montag}{Dienstag}{Mittwoch}
               {Donnerstag}{Freitag}{Samstag}{Sonntag}
\newdaylanguage{naustrian}{Montag}{Dienstag}{Mittwoch}
               {Donnerstag}{Freitag}{Samstag}{Sonntag}
\newdaylanguage{austrian}{Montag}{Dienstag}{Mittwoch}
               {Donnerstag}{Freitag}{Samstag}{Sonntag}
\newdaylanguage{swissgerman}{Montag}{Dienstag}{Mittwoch}
               {Donnerstag}{Freitag}{Samstag}{Sonntag}
\newdaylanguage{nswissgerman}{Montag}{Dienstag}{Mittwoch}
               {Donnerstag}{Freitag}{Samstag}{Sonntag}
\newdaylanguage{american}{Monday}{Tuesday}{Wednesday}
               {Thursday}{Friday}{Saturday}{Sunday}
\newdaylanguage{australian}{Monday}{Tuesday}{Wednesday}
               {Thursday}{Friday}{Saturday}{Sunday}
\newdaylanguage{british}{Monday}{Tuesday}{Wednesday}
               {Thursday}{Friday}{Saturday}{Sunday}
\newdaylanguage{canadian}{Monday}{Tuesday}{Wednesday}
               {Thursday}{Friday}{Saturday}{Sunday}
\newdaylanguage{english}{Monday}{Tuesday}{Wednesday}
               {Thursday}{Friday}{Saturday}{Sunday}
\newdaylanguage{newzealand}{Monday}{Tuesday}{Wednesday}
               {Thursday}{Friday}{Saturday}{Sunday}
\newdaylanguage{UKenglish}{Monday}{Tuesday}{Wednesday}
               {Thursday}{Friday}{Saturday}{Sunday}
\newdaylanguage{USenglish}{Monday}{Tuesday}{Wednesday}
               {Thursday}{Friday}{Saturday}{Sunday}
\newdaylanguage{acadian}{Lundi}{Mardi}{Mercredi}
               {Jeudi}{Vendredi}{Samedi}{Dimanche}
\newdaylanguage{canadien}{Lundi}{Mardi}{Mercredi}
               {Jeudi}{Vendredi}{Samedi}{Dimanche}
\newdaylanguage{francais}{Lundi}{Mardi}{Mercredi}
               {Jeudi}{Vendredi}{Samedi}{Dimanche}
\newdaylanguage{french}{Lundi}{Mardi}{Mercredi}
               {Jeudi}{Vendredi}{Samedi}{Dimanche}
\newdaylanguage{italian}{Luned\`\i}{Marted\`\i}{Mercoled\`\i}
               {Gioved\`\i}{Venerd\`\i}{Sabato}{Domenica}
\newdaylanguage{spanish}{Lunes}{Martes}{Mi\'ercoles}
               {Jueves}{Viernes}{S\'abado}{Domingo}
\newdaylanguage{croatian}{Ponedjeljak}{Utorak}{Srijeda}
               {\v{C}etvrtak}{Petak}{Subota}{Nedjelja}
\newdaylanguage{dutch}{Maandag}{Dinsdag}{Woensdag}
               {Donderdag}{Vrijdag}{Zaterdag}{Zondag}
\newdaylanguage{finnish}{Maanantai}{Tiistai}{Keskiviikko}
               {Torstai}{Perjantai}{Lauantai}{Sunnuntai}
\newdaylanguage{norsk}{Mandag}{Tirsdag}{Onsdag}
               {Torsdag}{Fredag}{L\o{}rdag}{S\o{}ndag}
\newdaylanguage{danish}{Mandag}{Tirsdag}{Onsdag}
               {Torsdag}{Fredag}{L\o{}rdag}{S\o{}ndag}
\newdaylanguage{swedish}{M\aa{}ndag}{Tisdag}{Onsdag}
               {Torsdag}{Fredag}{L\"ordag}{S\"ondag}
\newdaylanguage{polish}{Poniedzia\l{}ek}{Wtorek}{\'Sroda}
               {Czwartek}{Pi\aob{}tek}{Sobota}{Niedziela}
\newdaylanguage{czech}{Pond\v{e}l\'\i}{\'Uter\'y}{St\v{r}eda}
               {\v{C}tvrtek}{P\'atek}{Sobota}{Ned\v{e}le}
\newdaylanguage{slovak}{Pondelok}{Utorok}{Streda}
               {\v{S}tvrtok}{Piatok}{Sobota}{Nede\v{l}a}
\let\@dayname\dayname@english
\InputIfFileExists{scrdate.cfg}
           {\typeout{*************************************^^J%
                     * Local config file scrdate.cfg used^^J%
                     *************************************}}
           {}
%%% From File: $Id: scrlogo.dtx 1380 2013-10-01 15:31:55Z mjk $
\@ifundefined{KOMAScript}{%
  \DeclareRobustCommand{\KOMAScript}{\textsf{K\kern.05em O\kern.05em%
      M\kern.05em A\kern.1em-\kern.1em Script}}}{}
\endinput
%%
%% End of file `scrdate.sty'.