% \iffalse
% ======================================================================
% scrtime.dtx 
% Copyright (c) Markus Kohm, 1995-2024
%
% This file is part of the LaTeX2e KOMA-Script bundle.
%
% This work may be distributed and/or modified under the conditions of
% the LaTeX Project Public License, version 1.3c of the license.
% The latest version of this license is in
%   http://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions of LaTeX 
% version 2005/12/01 or later and of this work.
%
% This work has the LPPL maintenance status "author-maintained".
%
% The Current Maintainer and author of this work is Markus Kohm.
%
% This work consists of all files listed in MANIFEST.md.
% ======================================================================
%%% From File: $Id: scrtime.dtx 4099 2024-02-01 09:36:51Z kohm $
%<package&identify>\NeedsTeXFormat{LaTeX2e}[1995/06/01]
%<*driver>
\ifx\ProvidesFile\undefined\def\ProvidesFile#1[#2]{}\fi
\begingroup
  \def\filedate$#1: #2-#3-#4 #5${\gdef\filedate{#2/#3/#4}}
  \filedate$Date: 2024-02-01 10:36:51 +0100 (Do, 01 Feb 2024) $
  \def\filerevision$#1: #2 ${\gdef\filerevision{r#2}}
  \filerevision$Revision: 4099 $
\endgroup
\ProvidesFile{scrtime.dtx}[\filedate\space\filerevision\space
%</driver>
%<*driver|package>
%<identify&scrtime>\ProvidesPackage{scrtime}[%
%<identify&scrdate>\ProvidesPackage{scrdate}[%
%<*driver|identify>
%!KOMAScriptVersion
  package
%</driver|identify>
%<identify&scrtime>  (time of LaTeX run)%
%<identify&scrdate>  (day of the week)%
%<*driver|identify>
]
%</driver|identify>
%</driver|package>
%<*dtx>
\ifx\documentclass\undefined
  \input scrdocstrip.tex
  \@@input scrkernel-version.dtx
  \@@input scrstrip.inc
  \KOMAdefVariable{COPYRIGHFROM}{1995}
  \generate{\usepreamble\defaultpreamble
    \file{scrtime.sty}{%
      \from{scrkernel-version.dtx}{package,scrtime}%
      \from{scrtime.dtx}{package,scrtime,identify}%
      \from{scrkernel-basics.dtx}{load}%
      \from{scrtime.dtx}{package,scrtime,option}%
      \from{scrtime.dtx}{package,scrtime,body}%
      \from{scrlogo.dtx}{logo}%
    } %
    \file{scrdate.sty}{%
      \from{scrkernel-version.dtx}{package,scrdate}%
      \from{scrtime.dtx}{package,scrdate,identify}%
      \from{scrkernel-basics.dtx}{load}%
      \from{scrtime.dtx}{package,scrdate,option}%
      \from{scrtime.dtx}{package,scrdate,body}%
      \from{scrlogo.dtx}{logo}%
    } %
  }
  \@@input scrstrop.inc
\else
  \let\endbatchfile\relax
\fi
\endbatchfile
%</dtx>
%<*driver>
\documentclass[USenglish]{koma-script-source-doc}
\usepackage{babel}
\setcounter{StandardModuleDepth}{2}
\begin{document}
  \DocInput{scrtime.dtx}
\end{document}
%</driver>
% \fi
%
% \changes{v3.36}{2022/02/07}{switch over from \cls*{scrdoc} to
%   \cls*{koma-script-source-doc}}
% \changes{v3.36}{2022/02/07}{require package \pkg*{scrlogo} instead of
%   defining \cs{KOMAScript}}
% \changes{v3.40}{2023/04/17}{guide names changed}
%
% \GetFileInfo{scrtime.dtx}
% \title{The Current Time and Name of the Day with
%   \href{https://komascript.de}{\KOMAScript} Packages \pkg*{scrtime} and
%   \pkg*{scrdate}}
% \author{\href{mailto:komascript@gmx.info}{Markus Kohm}}
% \date{Revision \fileversion{} of \filedate}
% \maketitle
% \begin{abstract}
%   This bundle includes a package \pkg*{scrtime} defining some macros to
%   handle compilation-time.  It's a very simple implementation similar to
%   \pkg{time}. I've tried to not use additional registers.
%
%   The second package \pkg*{scrdate} defines some macros to handle the name
%   of the day!
% \end{abstract}
% \tableofcontents
%
% \section{User Manual}
%
% You can find the user manuals of \pkg*{scrtime} and \pkg*{scrdate} in the
% \KOMAScript{} manual, either the German \file{scrguide-de.pdf} or the
% English \file{scrguide-en.pdf}.
%
% \MaybeStop{\PrintIndex}
%
% \section{Implementation}
%
% \subsection{Options}
%
% Since version~1.2 both packages use \pkg*{scrkbase} for options and
% additional features. This is loaded by the \file{ins}-file, so we don't need
% to load it here.
%
%    \begin{macrocode}
%<*option>
%    \end{macrocode}
%
%
% \subsubsection{Options of \pkg*{scrtime}}
%
%    \begin{macrocode}
%<*scrtime>
%    \end{macrocode}
%
% \begin{option}{12h}
% \changes{v1.1b}{1995/02/15}{option \opt{12h} added}
% \changes{v1.2}{2010/03/10}{option uses \pkg*{scrkbase}}
% \begin{option}{24h}
% \changes{v1.1b}{1995/02/15}{option \opt{24h} added}
% \changes{v1.2}{2010/03/10}{option is deprecated}
% \changes{v3.39}{2022/11/16}{declare deprecated option only with \KOMAScript~3}
% \begin{macro}{\if@Hxii,\@Hxiitrue,\@Hxiifalse}
% \changes{v1.1b}{1995/02/15}{new switch}
% There are two the two Options |24h| and |12h|. We need a switch to
% distinguish.
%    \begin{macrocode}
\newif\if@Hxii
%    \end{macrocode}
% \end{macro}
% So the options are simple.
%    \begin{macrocode}
\KOMA@ifkey{12h}{@Hxii}
\@ifundefined{KOMA@DeclareDeprecatedOption}{}{%
  \KOMA@DeclareDeprecatedOption[scrtime]{24h}{12h=false}%
}
%    \end{macrocode}
% \end{option}
% \end{option}
%
% Currently only \pkg*{scrtime} uses options, so only \pkg*{scrtime} needs
% to process them.
%    \begin{macrocode}
\KOMAProcessOptions\relax
%    \end{macrocode}
%
%    \begin{macrocode}
%</scrtime>
%    \end{macrocode}
%
%    \begin{macrocode}
%</option>
%    \end{macrocode}
%
%
% \subsection{Commands and Macros}
%
%    \begin{macrocode}
%<*body>
%    \end{macrocode}
% 
% \subsubsection{Commands and Macros of \pkg*{scrtime}}
%
%    \begin{macrocode}
%<*scrtime>
%    \end{macrocode}
%
% \begin{command}{\thistime}
% \changes{v1.1b}{1995/02/15}{\cs{thistime*} added}
% \changes{v1.1b}{1995/02/15}{\cs{thistime} fixed}
% \changes{v3.20}{2016/04/12}{\cs{@ifstar} replaced by \cs{kernel@ifstar}}
% First we have to decide, is it a star-version ore not.
%    \begin{macrocode}
\def\thistime{%
  \kernel@ifstar
    {\let\@tempif\iffalse\@thistime}
    {\let\@tempif\iftrue\@thistime}}
%    \end{macrocode}
% \begin{macro}{\@thistime}
% \changes{v1.1b}{1995/02/15}{added}
% Know we have to calculate the hours and minutes. \cs{@tempcnta} are the
% hours and \cs{@tempcntb} are the minutes. We use a group to encapsulate the
% usage of the two local counters of from the \LaTeX{} kernel.
%    \begin{macrocode}
\newcommand*{\@thistime}[1][:]{%
  \begingroup
    \@tempcnta\time\divide\@tempcnta60\multiply\@tempcnta60
    \@tempcntb\time\advance\@tempcntb-\@tempcnta
    \divide\@tempcnta60
%    \end{macrocode}
% If we use 12h-mode, we have to cut the houres.
% \changes{v1.1d}{1996/01/14}{space added at \cs{@thistime} between -12
%                             and \cs{fi} (Martin Schroeder)}
%    \begin{macrocode}
    \if@Hxii\ifnum\@tempcnta>12 \advance\@tempcnta-12 \fi\fi
%    \end{macrocode}
% Know we have to compose the value. If the minutes are less than 10
% maybe there has to be an additional 0.
%    \begin{macrocode}
    \the\@tempcnta{#1}\@tempif\ifnum\@tempcntb<10 0\fi\fi\the\@tempcntb%
  \endgroup}
%    \end{macrocode}
% \end{macro}
% \end{command}
% 
%  \begin{command}{\settime}
% \changes{v1.1b}{1995/02/15}{redefines \cs{@thistime}}
% \changes{v1.1c}{1995/05/24}{missing macrocode-environment inserted}
% We simply have to set \cs{@thistime}.
%    \begin{macrocode}
\newcommand*{\settime}[1]{\renewcommand*{\@thistime}[1][]{#1}}
%    \end{macrocode}
% \end{command}
%
%
%    \begin{macrocode}
%</scrtime>
%    \end{macrocode}
% 
%
% \subsubsection{Commands and Macros of \pkg*{scrdate}}
%
%    \begin{macrocode}
%<*scrdate>
%    \end{macrocode}
% 
% \changes{v1.1a}{1995/02/12}{changed all but the user-interface}
% \changes{v3.05a}{2010/03/10}{changed everything}
% With version~3.05a \pkg*{scrdate} was rewritten.  First step was to make
% more macros full expandable to provide \cs{MakeUppercase} and
% \cs{MakeLowercase}. Second was to extend the user interface by some new
% functionality.
%
% \begin{command}{\CenturyPart}
% \changes{v3.05a}{2010/03/10}{added}
% This is the century part of a year number and so only a shortcut to
% |\XdivY{...}{100}|, that is defined at \pkg*{scrbase}.
%    \begin{macrocode}
\newcommand*{\CenturyPart}[1]{\XdivY{#1}{100}}
%    \end{macrocode}
% \end{command}
% 
% \begin{command}{\DecadePart}
% \changes{v3.05a}{2010/03/10}{added}
% This is the year number withoud the century part and therefrso only a
% shortcut to |\XmodY{...}{100}|, that is defined at \pkg*{scrbase}.
%    \begin{macrocode}
\newcommand*{\DecadePart}[1]{\XmodY{#1}{100}}
%    \end{macrocode}
% \end{command}
% 
% \begin{macro}{\@GaussYear}
% \changes{v3.05a}{2010/03/10}{added}
% At the Gauss calculation of the day of the week January and February relates
% to the year before. This macro does the correction for any date.
%    \begin{macrocode}
\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
}
%    \end{macrocode}
% \end{macro}
%
% \begin{command}{\DayNumber}
% \changes{v3.05a}{2010/03/10}{added}
% Returns the numerical value of the day of week. Note, that Sunday is 0,
% Monday is 1, \dots, Saturday is 6. We use the Gauss calculation of the day
% of the week. First argument is the year, second the month and last the day
% of the month.
%    \begin{macrocode}
\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}%
}
%    \end{macrocode}
% \end{command}
% \begin{command}{\ISODayNumber}
% \changes{v3.05a}{2010/03/10}{added}
% The same like \cs{DayNumber} but with ISO date argument.
%    \begin{macrocode}
\newcommand*{\ISODayNumber}[1]{\expandafter\@IsoDayNumber#1\@nil}
%    \end{macrocode}
% \begin{macro}{\@IsoDayNumber}
% \changes{v3.05a}{2010/03/10}{added}
%    \begin{macrocode}
\newcommand*{\@IsoDayNumber}{}
\def\@IsoDayNumber#1-#2-#3\@nil{\DayNumber{#1}{#2}{#3}}
%    \end{macrocode}
% \end{macro}
% \end{command}
% 
% \begin{command}{\DayName}
% \changes{v3.05a}{2010/03/10}{added}
% Returns the name of the day of the week. Arguments like \cs{DayNumber}.
%    \begin{macrocode}
\newcommand*{\DayName}[3]{\@dayname{\DayNumber{#1}{#2}{#3}}}
%    \end{macrocode}
% \end{command}
% \begin{command}{\ISODayName}
% \changes{v3.05a}{2010/03/10}{added}
% The same like \cs{DayName} but with ISO date argument.
%    \begin{macrocode}
\newcommand*{\ISODayName}[1]{\@dayname{\ISODayNumber{#1}}}
%    \end{macrocode}
% \end{command}
% 
% \begin{command}{\DayNameByNumber}
% \changes{v3.05a}{2010/03/10}{added}
% Returns the name of the day of the week. The argument is a number that will
% be transposed to the range 0\dots6.
%    \begin{macrocode}
\newcommand*{\DayNameByNumber}[1]{%
  \@dayname{\XmodY{#1}{7}}%
}
%    \end{macrocode}
% \end{command}
%
% \begin{command}{\ISOToday}
% \changes{v3.05a}{2010/03/10}{added}
% Returns the ISO date.
%    \begin{macrocode}
\newcommand*{\ISOToday}{%
  \the\year-\ifnum \month<10 0\fi\the\month-\ifnum \day<10 0\fi\the\day%
}
%    \end{macrocode}
% \end{command}
%
% \begin{command}{\IsoToday}
% \changes{v3.05a}{2010/03/10}{added}
% Returns the ISO date.
%    \begin{macrocode}
\newcommand*{\IsoToday}{%
  \the\year-\the\month-\the\day%
}
%    \end{macrocode}
% \end{command}
%
% \begin{command}{\todaysname}
% \changes{v3.05a}{2010/03/10}{re-implemented}
% Using \cs{DayName} this is very, very simple.
%    \begin{macrocode}
\newcommand*{\todaysname}{\DayName{\year}{\month}{\day}}
%    \end{macrocode}
% \end{command}
%
% \begin{command}{\todaysnumber}
% \changes{v3.05a}{2010/03/11}{added}
% Using \cs{DayNumber} this is very, very simple.
%    \begin{macrocode}
\newcommand*{\todaysnumber}{\DayNumber{\year}{\month}{\day}}
%    \end{macrocode}
% \end{command}
%
% \begin{command}{\nameday}
% \changes{v3.05a}{2010/03/10}{no longer \cs{long}}
% We simply have to redefine \cs{todaysname}.
%    \begin{macrocode}
\newcommand\nameday[1]{\renewcommand*{\todaysname}{#1}}
%    \end{macrocode}
% \end{command}
%
% \begin{command}{\newdaylanguage}
% \changes{v3.05a}{2010/03/10}{Sunday is 0}
% We write a macro to define the name of the days.
%   \begin{macro}{\scrdate@languagenamewarning}
% But before this, we have to define a once only warning.
%    \begin{macrocode}
\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
}
%    \end{macrocode}
%  \end{macro}
%    \begin{macrocode}
\newcommand\newdaylanguage[8]{%
%    \end{macrocode}
% First we check, if the language is defined at the format, the user uses.
% If it is not defined, we do not define the name of the days and warn.
%    \begin{macrocode}
  \scr@ifundefinedorrelax{l@#1}{%
    \PackageInfoNoLine{scrdate}{Language #1\space not defined.\MessageBreak
                                \protect\dayname@#1\space skipped}%
%    \end{macrocode}
% \changes{v1.1c}{1995/05/24}{missing \cs{end\{macrocode\}} added}
% If it is defined, we define the name-selection-macro
% \cs{dayname@\meta{language}}.
% First we define the new macro \cs{dayname@\meta{language}}:
% \changes{v3.05a}{2010/03/10}{group removed}
% \changes{v3.15}{2014/12/11}{more robust \cs{ifcase}}
%    \begin{macrocode}
  }{%
    \@namedef{dayname@#1}##1{%
        \ifcase\numexpr \XmodY{##1}{7}\relax
          #8\or #2\or #3\or #4\or #5\or #6\or #7\fi%
    }%
%    \end{macrocode}
% Then we define, what to do at \cs{begin\{document\}}:
%    \begin{macrocode}
    \AtBeginDocument{%
%    \end{macrocode}
% There we first have to test, if \cs{date\meta{language}} is defined
% (e.g. using package \pkg{german}). If not, we have to warn once more.
%    \begin{macrocode}
      \scr@ifundefinedorrelax{date#1}{%
        \PackageInfoNoLine{scrdate}
                          {\protect\date#1\space not defined.\MessageBreak
                           \protect\todaysname\space probably cannot use
                           \protect\dayname@#1}%
%    \end{macrocode}
% But if it is defined, we can use it
%    \begin{macrocode}
      }{%
%    \end{macrocode}
% There we first save \cs{date\meta{language}} as \cs{D@date\meta{language}}.
%    \begin{macrocode}
        \expandafter\let\csname D@date#1\expandafter\endcsname
                        \csname date#1\endcsname
%    \end{macrocode}
% Now we redefine \cs{date\meta{language}}. It first defines \cs{@dayname} and
% then calls saved macro.
%    \begin{macrocode}
        \@namedef{date#1}{%
          \expandafter\let\expandafter\@dayname\csname dayname@#1\endcsname
          \@nameuse{D@date#1}}%
%    \end{macrocode}
% Last we have to select this new \cs{date\meta{language}}.
% \changes{v1.1j}{2000/01/20}{use of \cs{languagename} if defined}
% \changes{v3.08b}{2011/03/31}{one \% added}
%    \begin{macrocode}
        \@ifundefined{languagename}{%
          \scrdate@languagenamewarning
          \ifnum\language=\@nameuse{l@#1}
            \@nameuse{date#1}%
          \fi
        }{%
          \@ifundefined{date\languagename}%
            {}%
            {\@nameuse{date\languagename}}%
        }%
      }%
    }%
  }%
}
%    \end{macrocode}
% \end{command}
% 
% \begin{macro}{\@dayname}
% This should be named selecting the language. Since I changed the definitions
% package \pkg{german} and equal may be loaded before or after \pkg*{scrdate}
% or not.
%
% First we define the usual languages using \cs{newdaylanguage}:
% \begin{macro}{\dayname@german}
%    \begin{macrocode}
\newdaylanguage{german}{Montag}{Dienstag}{Mittwoch}
               {Donnerstag}{Freitag}{Samstag}{Sonntag}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\dayname@ngerman}
% \changes{v1.1i}{1999/10/09}{new language ``ngerman''}
%    \begin{macrocode}
\newdaylanguage{ngerman}{Montag}{Dienstag}{Mittwoch}
               {Donnerstag}{Freitag}{Samstag}{Sonntag}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\dayname@naustrian}
% \changes{v3.08b}{2011/02/22}{new language ``naustrian''}
%    \begin{macrocode}
\newdaylanguage{naustrian}{Montag}{Dienstag}{Mittwoch}
               {Donnerstag}{Freitag}{Samstag}{Sonntag}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\dayname@austrian}
% \changes{v3.08b}{2011/02/22}{new language ``austrian''}
%    \begin{macrocode}
\newdaylanguage{austrian}{Montag}{Dienstag}{Mittwoch}
               {Donnerstag}{Freitag}{Samstag}{Sonntag}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\dayname@swissgerman}
% \changes{v3.13}{2014/01/23}{new language ``swissgerman''}
%    \begin{macrocode}
\newdaylanguage{swissgerman}{Montag}{Dienstag}{Mittwoch}
               {Donnerstag}{Freitag}{Samstag}{Sonntag}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\dayname@nswissgerman}
% \changes{v3.13}{2014/01/23}{new language ``nswissgerman''}
%    \begin{macrocode}
\newdaylanguage{nswissgerman}{Montag}{Dienstag}{Mittwoch}
               {Donnerstag}{Freitag}{Samstag}{Sonntag}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\dayname@american}
% \changes{v3.13}{2014/01/23}{new language ``american''}
%    \begin{macrocode}
\newdaylanguage{american}{Monday}{Tuesday}{Wednesday}
               {Thursday}{Friday}{Saturday}{Sunday}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\dayname@australian}
% \changes{v3.13}{2014/01/23}{new language ``australian''}
%    \begin{macrocode}
\newdaylanguage{australian}{Monday}{Tuesday}{Wednesday}
               {Thursday}{Friday}{Saturday}{Sunday}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\dayname@british}
% \changes{v3.13}{2014/01/23}{new language ``british''}
%    \begin{macrocode}
\newdaylanguage{british}{Monday}{Tuesday}{Wednesday}
               {Thursday}{Friday}{Saturday}{Sunday}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\dayname@canadian}
% \changes{v3.13}{2014/01/23}{new language ``canadian''}
%    \begin{macrocode}
\newdaylanguage{canadian}{Monday}{Tuesday}{Wednesday}
               {Thursday}{Friday}{Saturday}{Sunday}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\dayname@english}
% \changes{v1.1g}{1997/06/21}{correct name is ``tuesday''}
%    \begin{macrocode}
\newdaylanguage{english}{Monday}{Tuesday}{Wednesday}
               {Thursday}{Friday}{Saturday}{Sunday}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\dayname@newzealand}
% \changes{v3.13}{2014/01/23}{new language ``newzealand''}
%    \begin{macrocode}
\newdaylanguage{newzealand}{Monday}{Tuesday}{Wednesday}
               {Thursday}{Friday}{Saturday}{Sunday}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\dayname@UKenglish}
% \changes{v3.13}{2014/01/23}{new language ``UKenglish''}
%    \begin{macrocode}
\newdaylanguage{UKenglish}{Monday}{Tuesday}{Wednesday}
               {Thursday}{Friday}{Saturday}{Sunday}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\dayname@ukenglish}
% \changes{v3.24}{2017/05/29}{new language ``ukenglish''}
%    \begin{macrocode}
\newdaylanguage{ukenglish}{Monday}{Tuesday}{Wednesday}
               {Thursday}{Friday}{Saturday}{Sunday}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\dayname@USenglish}
% \changes{v1.1g}{1997/06/21}{correct name is ``tuesday''}
%    \begin{macrocode}
\newdaylanguage{USenglish}{Monday}{Tuesday}{Wednesday}
               {Thursday}{Friday}{Saturday}{Sunday}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\dayname@usenglish}
% \changes{v3.24}{2017/05/29}{new language ``usenglish''}
%    \begin{macrocode}
\newdaylanguage{usenglish}{Monday}{Tuesday}{Wednesday}
               {Thursday}{Friday}{Saturday}{Sunday}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\dayname@acadian}
% \changes{v3.13}{2014/01/23}{new language ``acadian''}
%    \begin{macrocode}
\newdaylanguage{acadian}{Lundi}{Mardi}{Mercredi}
               {Jeudi}{Vendredi}{Samedi}{Dimanche}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\dayname@canadien}
% \changes{v3.13}{2014/01/23}{new language ``canadien''}
%    \begin{macrocode}
\newdaylanguage{canadien}{Lundi}{Mardi}{Mercredi}
               {Jeudi}{Vendredi}{Samedi}{Dimanche}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\dayname@francais}
% \changes{v3.13}{2014/01/23}{new language ``francais''}
%    \begin{macrocode}
\newdaylanguage{francais}{Lundi}{Mardi}{Mercredi}
               {Jeudi}{Vendredi}{Samedi}{Dimanche}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\dayname@french}
%    \begin{macrocode}
\newdaylanguage{french}{Lundi}{Mardi}{Mercredi}
               {Jeudi}{Vendredi}{Samedi}{Dimanche}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\dayname@italian}
% \changes{v1.1f}{1997/06/06}{New (thanks to Lorenzo M.\ Catucci)}
%    \begin{macrocode}
\newdaylanguage{italian}{Luned\`\i}{Marted\`\i}{Mercoled\`\i}
               {Gioved\`\i}{Venerd\`\i}{Sabato}{Domenica}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\dayname@spanish}
% \changes{v1.1h}{1997/07/26}{New (thanks to Ralph J.\ Hangleiter)}
%    \begin{macrocode}
\newdaylanguage{spanish}{Lunes}{Martes}{Mi\'ercoles}
               {Jueves}{Viernes}{S\'abado}{Domingo}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\dayname@croatian}
% \changes{v1.1l}{2001/10/05}{New (thanks to Branka Lon\v{c}arevi\'{c})}
%  \begin{macrocode}
\newdaylanguage{croatian}{Ponedjeljak}{Utorak}{Srijeda}
               {\v{C}etvrtak}{Petak}{Subota}{Nedjelja}
%    \end{macrocode}
% \end{macro}
% \begin{macro}{\dayname@dutch}
% \changes{v1.1m}{2002/02/02}{New (thanks to Henk Jongbloets)}
% \changes{v1.1p}{2009/01/01}{fixed to upper case}
%    \begin{macrocode}
\newdaylanguage{dutch}{Maandag}{Dinsdag}{Woensdag}
               {Donderdag}{Vrijdag}{Zaterdag}{Zondag}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\dayname@finnish}
% \changes{v1.1n}{2005/02/07}{New (thanks to Hannu V\"ais\"anen)}
%    \begin{macrocode}
\newdaylanguage{finnish}{Maanantai}{Tiistai}{Keskiviikko}
               {Torstai}{Perjantai}{Lauantai}{Sunnuntai}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\dayname@norsk}
% \changes{v1.1p}{2009/01/01}{New (thank to Sveinung Heggen)}
%    \begin{macrocode}
\newdaylanguage{norsk}{Mandag}{Tirsdag}{Onsdag}
               {Torsdag}{Fredag}{L\o{}rdag}{S\o{}ndag}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\dayname@danish}
% \changes{v3.08}{2011/01/18}{New (thanks to Benjamin Hell)}
%    \begin{macrocode}
\newdaylanguage{danish}{Mandag}{Tirsdag}{Onsdag}
               {Torsdag}{Fredag}{L\o{}rdag}{S\o{}ndag}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\dayname@swedish}
% \changes{v3.08}{2011/01/18}{New (thanks to Benjamin Hell)}
%    \begin{macrocode}
\newdaylanguage{swedish}{M\aa{}ndag}{Tisdag}{Onsdag}
               {Torsdag}{Fredag}{L\"ordag}{S\"ondag}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\dayname@polish}
% \changes{v3.13}{2014/01/07}{New (thanks to Blandyna Bogdol)}
% \changes{v3.13}{2014/01/23}{Fixed (thanks to Elke Schubert)}
%    \begin{macrocode}
\newdaylanguage{polish}{Poniedzia\l{}ek}{Wtorek}{\'Sroda}
               {Czwartek}{Pi\aob{}tek}{Sobota}{Niedziela}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\dayname@czech}
% \changes{v3.13}{2014/01/23}{New (thanks to Elke Schubert)}
%    \begin{macrocode}
\newdaylanguage{czech}{Pond\v{e}l\'\i}{\'Uter\'y}{St\v{r}eda}
               {\v{C}tvrtek}{P\'atek}{Sobota}{Ned\v{e}le}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\dayname@slovak}
% \changes{v3.13}{2014/02/26}{New (thanks to Elke Schubert)}
%    \begin{macrocode}
\newdaylanguage{slovak}{Pondelok}{Utorok}{Streda}
               {\v{S}tvrtok}{Piatok}{Sobota}{Nede\v{l}a}
%    \end{macrocode}
% \end{macro}
%
% If there are no language-definitions, we simply want the US-english names
% of the days.
% \changes{v1.1g}{1997/06/21}{correct name is ``tuesday''}
% \changes{v3.15}{2014/12/11}{default language definition fixed}
%    \begin{macrocode}
\let\@dayname\dayname@english
%    \end{macrocode}
%  \end{macro}
%
% Last but not least file \file{scrdate.cfg} has to be included,
% if it exists.
% \changes{v3.42}{2024/02/01}{\cs{typeout} replaced by either
%   \cs{PackageNote} or \cs{PackageInfo}}
%    \begin{macrocode}
\InputIfFileExists{scrdate.cfg}
  {%
    \@ifundefined{PackageNote}{\PackageInfo}{\PackageNote}%
      {scrdate}{Local configuration file scrdate.cfg loaded}%
  }{}
%    \end{macrocode}
%
%    \begin{macrocode}
%</scrdate>
%    \end{macrocode}
%
%    \begin{macrocode}
%</body>
%    \end{macrocode}
% 
% \Finale
% \PrintChanges
% 
% \endinput
% Local Variables:
% mode: doctex
% ispell-local-dictionary: "en_US"
% eval: (flyspell-mode 1)
% TeX-master: t
% TeX-engine: luatex-dev
% eval: (setcar (or (cl-member "Index" (setq-local TeX-command-list (copy-alist TeX-command-list)) :key #'car :test #'string-equal) (setq-local TeX-command-list (cons nil TeX-command-list))) '("Index" "mkindex %s" TeX-run-index nil t :help "makeindex for dtx"))
% End: