summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/koma-script/scrdate.sty
blob: 78e0fad466bb35b352bcda462d10af95ef1889b7 (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
%%
%% This is file `scrdate.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% scrtime.dtx  (with options: `scrdate')
%% scrlogo.dtx 
%% 
%% Copyright (C) 1994-2004 by Markus Kohm.
%% 
%% All rights reserved. For further copyright information see the file
%% legal.txt, and any other copyright indicated in this file.
%% 
%% This file is part of the LaTeX2e KOMA-Script-bundle.
%% ----------------------------------------------------
%% 
%% The KOMA-Script-bundle (but not this file) bases on the
%% Script-family created by Frank Neukam 1993 and the standard
%% documents classes created by the LaTeX3-Team 1994-1996.
%% -------------------------------------------------------------
%% 
%%  This system is distributed in the hope that it will be useful,
%%  but WITHOUT ANY WARRANTY; without even the implied warranty of
%%  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
%% 
%% 
%% IMPORTANT NOTICE:
%% 
%% For error reports in case of UNCHANGED versions see documentation.
%% 
%% Please do not request updates from us directly. Distribution is
%% done through Mail-Servers, Mailboxes and TeX organizations.
%% 
%% You are not allowed to change this file.
%% 
%% You are allowed to distribute this file under the condition that
%% it is distributed together with all files mentioned in readme.txt
%% and liesmich.txt. See LEGAL.TXT or LEGALDE.TXT for further
%% information.
%% 
%% If you receive only some of these files from someone, complain!
%% 
%% You are NOT ALLOWED to distribute this file alone.
%% 
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{scrdate}
                [2002/02/02 v1.1m LaTeX2e KOMA
                 package]
\newcommand\todaysname{%
  \begingroup%
  \@tempcnta=\year
  \@tempcntb=1 % 1. Januar 1980 war ein Dienstag
  \ifnum\@tempcnta<1980 unknown\else%
    \advance\@tempcnta by-1980%
    \@whilenum\@tempcnta>3\do%
    {\advance\@tempcntb by5\advance\@tempcnta by-4}%
    \ifnum\@tempcnta=0%
      \ifnum\month>2\advance \@tempcntb by1\fi%
    \else%
      \advance\@tempcntb by\@tempcnta%
      \advance\@tempcntb by1
    \fi%
    \ifcase\month\or\or\advance\@tempcntb3%  Jan =  28 + 3
                    \or\advance\@tempcntb3% +Feb =  56 + 3
                    \or\advance\@tempcntb6% +Mar =  84 + 6
                    \or\advance\@tempcntb1% +Apr = 119 + 1
                    \or\advance\@tempcntb4% +May = 147 + 4
                    \or\advance\@tempcntb6% +Jun = 175 + 6
                    \or\advance\@tempcntb2% +Jul = 210 + 2
                    \or\advance\@tempcntb5% +Aug = 238 + 5
                    \or%                    +Sep = 273 + 0
                    \or\advance\@tempcntb3% +Oct = 301 + 3
                    \or\advance\@tempcntb5% +Nov = 329 + 5
    \fi%
    \advance\@tempcntb by\day%
    \advance\@tempcntb by-1% die Zaehlung beginnt bei 0
    \@whilenum\@tempcntb>6\do%
    {\advance\@tempcntb by-7}%
    \@dayname{\@tempcntb}%
  \fi\endgroup}
\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]{%
  \begingroup\expandafter\expandafter\expandafter\endgroup
  \expandafter\ifx\csname l@#1\endcsname\relax
    \PackageWarningNoLine{scrdate}{Language #1\space not defined.\MessageBreak
                                  \protect\dayname@#1\space skipped!}
  \else
    \@namedef{dayname@#1}##1{%
      \begingroup%
        \@tempcnta ##1%
        \ifcase\@tempcnta%
          #2\or #3\or #4\or #5\or #6\or #7\or #8\fi\endgroup%
    }
    \AtBeginDocument{
      \begingroup\expandafter\expandafter\expandafter\endgroup
      \expandafter\ifx\csname date#1\endcsname\relax
        \PackageWarningNoLine{scrdate}
                             {\protect\date#1\space not defined.\MessageBreak
                              \protect\todaysname maybe can't use
                              \protect\dayname@#1!}
      \else
        \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}}
        }
      \fi
    }
  \fi
}
\newdaylanguage{german}{Montag}{Dienstag}{Mittwoch}
               {Donnerstag}{Freitag}{Samstag}{Sonntag}
\newdaylanguage{ngerman}{Montag}{Dienstag}{Mittwoch}
               {Donnerstag}{Freitag}{Samstag}{Sonntag}
\newdaylanguage{english}{Monday}{Tuesday}{Wednesday}
               {Thursday}{Friday}{Saturday}{Sunday}
\newdaylanguage{USenglish}{Monday}{Tuesday}{Wednesday}
               {Thursday}{Friday}{Saturday}{Sunday}
\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}
\def\@dayname#1{%
  \begingroup%
    \@tempcnta #1%
    \ifcase\@tempcnta%
      Monday\or Tuesday\or Wednesday\or Thursday\or
      Friday\or Saturday\or Sunday\fi\endgroup%
}
\InputIfFileExists{scrdate.cfg}
           {\typeout{*************************************^^J%
                     * Local config file scrdate.cfg used^^J%
                     *************************************}}
           {}
\@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'.