\ProvidesFile{datetime.tex}[2002/06/17 KOMA-Script manual english]
% ============================================================================
% datetime.tex 
% Copyright (c) 2001 Markus Kohm and the authors.
%
% This file is part of the LaTeX2e KOMA-Script-Bundle
%
% This file can be redistributed and/or modified under the terms of the LaTeX
% Project Public License Version 1.0 distributed together with this file. See
% LEGAL.TXT or LEGALDE.TXT.
%
% This bundle is written specialy for use at german-language. So the main
% documentation is german. There may also be an english documentation. See
% readme.txt, if you search for it.
% ----------------------------------------------------------------------------
% datetime.tex
% Copyright (c) 2001 Markus Kohm und bei den weiteren Autoren.
%
% Diese Datei ist Teil des LaTeX2e KOMA-Script-Pakets.
%
% Diese Datei kann nach den Regeln der LaTeX Project Public Licence 
% Version 1.0, wie sie zusammen mit dieser Datei verteilt wird,
% weiterverbreitet und/oder modifiziert werden. Siehe dazu auch LEGAL.TXT oder
% LEGALDE.TXT.
%
% Dieses Paket ist fuer den deutschen Sprachraum konzipiert. Daher ist auch
% diese Anleitung komplett in Deutsch. Moeglicherweise existiert auch eine
% englische Version der Anleitung. Falls Sie eine solche benoetigen, schauen
% Sie bitte in liesmich.txt nach, ob eine solche vorhanden ist.
% ============================================================================
%
% Module:                         Date and time
% Translation by:                 Markus Kohm (MJK) <markus.kohm@gmx.de>
% Contents:                       Extended output of date and time
%                                 using scrdate and scrtime
% Language:                       English
% Charset of comments:            US-ASCII
% Translation of german file:     datmzeit.tex
% Date of translated german file: 2001-10-05
%

\chapter{Week-Day and Time Using \Package{scrdate} and \Package{scrtime}}
\label{cha:datetime}

There are two packages at \KOMAScript{} to improve and extend the
handling of date\Index{date} and time\Index{time}. So you have not
only the standard commands \Macro{today} and \Macro{date}. Like all
the other packages from \KOMAScript{} bundle these two packages may be used
not only with \KOMAScript{} classes but also with standard and many
other classes.


\section{The Name of the Current Day of Week Using \Package{scrdate}}
\label{sec:sec:datetime.scrdate}
\BeginIndex{Package}{scrdate}

\begin{Declaration}
  \Macro{todaysname}
\end{Declaration}%
\BeginIndex{Cmd}{todaysname}%
You should know, that you may get the current date with
\Macro{today}\IndexCmd{today} in a language dependend
spelling. \Package{scrdate} offers you the command
\Macro{todaysname}. This results in the name of the current day of
week in a language dependend spelling.
\begin{Example}
  At your document you want to show the name of the week-day at which
  the \File{dvi}-file was generated using \LaTeX. To do this, you
  write:
  \begin{small}
\begin{verbatim}
  I've done the \LaTeX-run of this document on a \todaysname.
\end{verbatim}
  \end{small}
  This will result in e.g.:
  \begin{quote}
    I've done the \LaTeX-run of this document on a \todaysname.
  \end{quote}
\end{Example}
\begin{Explain}
  \textbf{Tip:} The names of the week-days are saved in
  capitalization. So the first letter is a capital letter, all the
  others are small letters. But at some languages you also need the
  names with a first letter in lower case. You may achieve this using
  the standard \LaTeX{} command \Macro{MakeLowercase}. You simply have
  to write \Macro{MakeLowercase}\PParameter{\Macro{todaysname}}.
\end{Explain}
\EndIndex{Cmd}{todaysname}

\begin{Declaration}
  \Macro{nameday}\Parameter{name}
\end{Declaration}%
\BeginIndex{Cmd}{nameday}%
You should know, that you may change the output of \Macro{today} using
\Macro{date}\IndexCmd{date}. In a analogous way you can change the
output of \Macro{todaysname} using \Macro{nameday} into \PName{name}.
\begin{Example}
  You're changing the current date into a fix value using
  \Macro{date}. You are not interested in the name of the day, but
  you want to show, that it is a workday. So you set:
  \begin{small}
\begin{verbatim}
  \nameday{workday}
\end{verbatim}
  \end{small}
  After this the previous example will result in:
  \begin{quote}
    I've done the \LaTeX-run of this document on a workday.
  \end{quote}
\end{Example}
\EndIndex{Cmd}{nameday}

Package \Package{scrdate} knows the languages english (english,
american, USenglish, UKenglish and british), german (german, ngerman
and austrian), french, italian, spanish and croatian. If you want to
configure it for other languages, see \File{scrdate.dtx}.

At current implementation it doesn't matter, if you're loading
\Package{scrdate} before or after
\Package{german}\IndexPackage{german},
\Package{ngerman}\IndexPackage{ngerman},
\Package{babel}\IndexPackage{babel} or similar packages. The current
language will be setup at \Macro{begin}\PParameter{document}.

\begin{Explain}
  To explain it a little bit more exactly: While you are using a
  language selection, which works in a compatible way to
  \Package{babel}\IndexPackage{babel} or
  \Package{german}\IndexPackage{german}, the correct language will be
  used by \Package{scrdate}. If you are using another language
  selection you will get english caption names. At \File{scrdate.dtx}
  you will find the description of the \Package{scrdate}-commands for
  defining the names.
\end{Explain}
\EndIndex{Package}{scrdate}


\section{Getting the Time with Package \Package{scrtime}}
\label{sec:datetime.scrtime}
\BeginIndex{Package}{scrtime}

\begin{Declaration}%
  \Macro{thistime}\OParameter{delimiter}\\
  \Macro{thistime*}\OParameter{delimiter}
\end{Declaration}%
\BeginIndex{Cmd}{thistime}\BeginIndex{Cmd}{thistime*}%
\Macro{thistime} results in the current\Index{time}.
The delimiter between the values of hour and minute 
can be given in the optional argument.
The default symbol of the delimiter is "\PValue{:}".

\Macro{thistime*} works in the same way as \Macro{thistime}.
The difference between both is that the value of the minute
using \Macro{thistime*} is not preceded with zero when its value
is less than 10, thus using \Macro{thistime} the minute-value
has always two places.
\begin{Example}
  The line
  \begin{small}
\begin{verbatim}
  Your train departs at \thistime .
\end{verbatim}
  \end{small}
  results for example in:
  \begin{quote}
    Your train departs at \thistime .
  \end{quote}
  or:
  \begin{quote}
    Your train departs at 23:09.
  \end{quote}
  \bigskip
  In contrast to the prevous example a line like:
  \begin{small}
\begin{verbatim}
  This day is already \thistime*[\ hours and\ ] minutes old.
\end{verbatim}
  \end{small}
  results in:
  \begin{quote}
    This day is already \thistime*[\ hours and\ ] minutes old.
  \end{quote}
  or:
  \begin{quote}
    This day is already 12 hours and 25 minutes old.
  \end{quote}
\end{Example}
\EndIndex{Cmd}{thistime}\EndIndex{Cmd}{thistime*}

\begin{Declaration}%
 \Macro{settime}\Parameter{Time}
\end{Declaration}%
\BeginIndex{Cmd}{settime}%
\Macro{settime} sets the output \Macro{thistime} and
\Macro{thistime*} on the value of \PName{Time}.
Afterwards the optinal parameter of \Macro{thistime} or
\Macro{thistime*} is ignored, since the result
of \Macro{thistime} or \Macro{thistime*}
was completely determined using \Macro{settime}.%
\EndIndex{Cmd}{settime}

\begin{Declaration}
  \Option{12h}\\
  \Option{24h}
\end{Declaration}%
\BeginIndex{Option}{12h}\BeginIndex{Option}{24h}%
Using the options \Option{12h} and \Option{24h} one can
select whether the result of \Macro{thistime} and \Macro{thistime*}
is in 12- or in 24-hour format. The default is \Option{24h}.%

The option has no effect on the results of
\Macro{thistime} and \Macro{thistime*} if \Macro{settime}
has been used.%
\EndIndex{Option}{12h}\EndIndex{Option}{24h}
\EndIndex{Package}{scrtime}

\section{Authors}
\label{sec:datetime.authors}
The authors listed below are responsible for this chapter or have
contributed to this chapter in different ways.
% Please use \textit{} for the name of the translator add all the
% names of the untranslated german file. If the translator is the
% main author, simply use \textbf. 
\begin{itemize}
\item Frank Neukam
\item Markus Kohm \TextEMail{Markus.Kohm@gmx.de}
\item Axel Sommerfeldt
\end{itemize}

%%% Local Variables: 
%%% mode: latex
%%% TeX-master: "main"
%%% End: 
