$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r48806 - sandbox/committee/concepts/stdlib
From: dgregor_at_[hidden]
Date: 2008-09-17 01:27:15
Author: dgregor
Date: 2008-09-17 01:27:15 EDT (Wed, 17 Sep 2008)
New Revision: 48806
URL: http://svn.boost.org/trac/boost/changeset/48806
Log:
Add isodate
Added:
   sandbox/committee/concepts/stdlib/isodate.sty   (contents, props changed)
Added: sandbox/committee/concepts/stdlib/isodate.sty
==============================================================================
--- (empty file)
+++ sandbox/committee/concepts/stdlib/isodate.sty	2008-09-17 01:27:15 EDT (Wed, 17 Sep 2008)
@@ -0,0 +1,394 @@
+%%
+%% This is file `isodate.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% isodate.dtx  (with options: `isodate')
+%% 
+%%   isodate package
+%% 
+%%   Copyright  2000--2005 Harald Harders
+%% 
+%%   This program can be redistributed and/or modified under the terms
+%%   of the LaTeX Project Public License Distributed from CTAN
+%%   archives in directory macros/latex/base/lppl.txt; either
+%%   version 1 of the License, or any later version.
+%% 
+%%   h.harders_at_[hidden]
+%% 
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{isodate}
+  [2005/04/15  v2.28  Print dates with different formats (HH)]
+\RequirePackage{ifthen}
+\IfFileExists{substr.sty}{\RequirePackage{substr}%
+ }{\PackageError{isodate.sty}{Package file substr.sty not found}
+   {This version of isodate.sty needs the package substr.sty.^^J%
+     You can download it from
+     CTAN:/macros/latex/contrib/substr/^^J%
+     e.g., one CTAN node is ftp.dante.de.
+     Install substr.sty into your TeX tree.}}
+\DeclareOption{iso}{\AtEndOfPackage{\isodate}}
+\DeclareOption{num}{\AtEndOfPackage{\numdate}}
+\DeclareOption{short}{\AtEndOfPackage{\shortdate}}
+\DeclareOption{TeX}{\AtEndOfPackage{\TeXdate}}
+\DeclareOption{orig}{\AtEndOfPackage{\origdate}}
+\DeclareOption{shortorig}{\AtEndOfPackage{\shortorigdate}}
+\DeclareOption{Roman}{\AtEndOfPackage{\Romandate}}
+\DeclareOption{roman}{\AtEndOfPackage{\romandate}}
+\DeclareOption{shortRoman}{\AtEndOfPackage{\shortRomandate}}
+\DeclareOption{shortroman}{\AtEndOfPackage{\shortromandate}}
+\DeclareOption{cleanlook}{\AtEndOfPackage{\cleanlookdateon}}
+\DeclareOption{nocleanlook}{\AtEndOfPackage{\cleanlookdateoff}}
+\DeclareOption{inputenglish}{\AtEndOfPackage{\dateinputformat{english}}}
+\DeclareOption{inputbritish}{\AtEndOfPackage{\dateinputformat{english}}}
+\DeclareOption{inputUKenglish}{\AtEndOfPackage{\dateinputformat{english}}}
+\DeclareOption{inputamerican}{\AtEndOfPackage{\dateinputformat{american}}}
+\DeclareOption{inputUSenglish}{\AtEndOfPackage{\dateinputformat{american}}}
+\DeclareOption{inputtex}{\AtEndOfPackage{\dateinputformat{tex}}}
+\DeclareOption{inputTeX}{\AtEndOfPackage{\dateinputformat{tex}}}
+\DeclareOption{inputlatex}{\AtEndOfPackage{\dateinputformat{tex}}}
+\DeclareOption{inputLaTeX}{\AtEndOfPackage{\dateinputformat{tex}}}
+\DeclareOption{american}{\input{english.idf}}
+\DeclareOption{australian}{\input{english.idf}}
+\DeclareOption{austrian}{\input{german.idf}}
+\DeclareOption{danish}{\input{danish.idf}}
+\DeclareOption{english}{\input{english.idf}}
+\DeclareOption{british}{\input{english.idf}}
+\DeclareOption{french}{\input{french.idf}}
+\DeclareOption{frenchb}{\input{french.idf}}
+\DeclareOption{german}{\input{german.idf}}
+\DeclareOption{italian}{\input{italian.idf}}
+\DeclareOption{naustrian}{\input{german.idf}}
+\DeclareOption{newzealand}{\input{english.idf}}
+\DeclareOption{ngerman}{\input{german.idf}}
+\DeclareOption{norsk}{\input{norsk.idf}}
+\DeclareOption{norwegian}{\input{norsk.idf}}
+\DeclareOption{swedish}{\input{swedish.idf}}
+\DeclareOption{UKenglish}{\input{english.idf}}
+\DeclareOption{USenglish}{\input{english.idf}}
+\DeclareOption*{%
+  \InputIfFileExists{\CurrentOption.idf}{}{%
+    \PackageError{isodate}{%
+      Isodate definition file \CurrentOption.idf not found}{%
+      Maybe you misspelled the language option?}}%
+  }
+\ExecuteOptions{orig,nocleanlook}
+\ProcessOptions*
+\ifx\iso_at_languageloaded\@undefined
+  \PackageError{isodate}{%
+    You haven't specified a language option}{%
+    You need to specify a language, either as a global
+    option\MessageBreak
+    or as an optional argument to the \string\usepackage\space
+    command.\MessageBreak
+    If you have used the old isodate package (version <=1.06) you can
+    change the\MessageBreak
+    usepackage command to \protect\usepackage{isodate}.\MessageBreak
+    You shouldn't try to proceed from here, type x to quit.}
+\fi
+\newcommand*\iso_at_printday[1]{%
+  \ifisotwodigitday
+    \ifthenelse{\number#1<10}{0}{}%
+  \fi
+  \number#1%
+}%
+\newcommand*\twodigitarabic[1]{%
+  \ifthenelse{\number\arabic{#1}<10}{0}{}%
+  \arabic{#1}%
+}
+\newcommand*\iso_at_printmonth[1]{%
+  \setcounter{iso_at_tmpmonth}{#1}%
+  \theiso_at_tmpmonth%
+}
+\newcounter{iso_at_tmpmonth}
+\newcounter{iso_at_yeartwo}%
+\newcommand*\iso_at_yeartwo[1]{%
+  \setcounter{iso_at_yeartwo}{\number#1}%
+  \whiledo{\theiso_at_yeartwo>99}{%
+    \addtocounter{iso_at_yeartwo}{-100}}{}%
+  \ifthenelse{\number\theiso_at_yeartwo<10}{0}{}\theiso_at_yeartwo
+}
+\newcommand*\iso_at_yearfour[1]{%
+  \ifthenelse{\number#1<1000}{0}{}%
+  \ifthenelse{\number#1<100}{0}{}%
+  \ifthenelse{\number#1<10}{0}{}%
+  \number#1%
+}%
+\newif\ifisotwodigitday
+\def\iso_at_dateformat{numeric}
+\DeclareRobustCommand*\dateinputformat[1]{%
+  \ifthenelse{%
+    \equal{#1}{english}\or
+    \equal{#1}{british}\or
+    \equal{#1}{UKenglish}}{%
+    \def\iso_at_inputformat{english}%
+  }{%
+    \ifthenelse{%
+      \equal{#1}{american}\or
+      \equal{#1}{USenglish}}{%
+      \def\iso_at_inputformat{american}%
+    }{%
+      \ifthenelse{%
+        \equal{#1}{tex}\or
+        \equal{#1}{TeX}\or
+        \equal{#1}{latex}\or
+        \equal{#1}{LaTeX}}{%
+        \def\iso_at_inputformat{tex}%
+      }{%
+        \PackageError{isodate}{Invalid date input format}{%
+          Maybe you misspelled the language option (english, american,
+          tex)?}%
+      }%
+    }%
+  }%
+}
+\dateinputformat{english}
+\DeclareRobustCommand*\numdate[1][twodigitarabic]{%
+  \def\iso_at_dateformat{numeric}%
+  \isotwodigitdaytrue
+  \def\theiso_at_tmpmonth{\csname #1\endcsname{iso_at_tmpmonth}}%
+}
+\DeclareRobustCommand*\shortdate[1][twodigitarabic]{%
+  \def\iso_at_dateformat{short}%
+  \isotwodigitdaytrue
+  \def\theiso_at_tmpmonth{\csname #1\endcsname{iso_at_tmpmonth}}%
+}
+\DeclareRobustCommand*\isodate[1][twodigitarabic]{%
+  \def\iso_at_dateformat{iso}%
+  \isotwodigitdaytrue
+  \def\theiso_at_tmpmonth{\csname #1\endcsname{iso_at_tmpmonth}}%
+}
+\DeclareRobustCommand*\origdate{%
+  \def\iso_at_dateformat{orig}%
+  \isotwodigitdayfalse
+  \def\theiso_at_tmpmonth{\twodigitarabic{iso_at_tmpmonth}}%
+}
+\DeclareRobustCommand*\shortorigdate{%
+  \def\iso_at_dateformat{shortorig}%
+  \isotwodigitdayfalse
+  \def\theiso_at_tmpmonth{\twodigitarabic{iso_at_tmpmonth}}%
+}
+\DeclareRobustCommand*\TeXdate[1][twodigitarabic]{%
+  \def\iso_at_dateformat{TeX}%
+  \isotwodigitdaytrue
+  \def\theiso_at_tmpmonth{\csname #1\endcsname{iso_at_tmpmonth}}%
+}
+\DeclareRobustCommand*\Romandate{%
+  \numdate[Roman]%
+  \isotwodigitdayfalse
+}
+\DeclareRobustCommand*\romandate{%
+  \numdate[roman]%
+  \isotwodigitdayfalse
+}
+\DeclareRobustCommand*\shortRomandate{%
+  \shortdate[Roman]%
+  \isotwodigitdayfalse
+}
+\DeclareRobustCommand*\shortromandate{%
+  \shortdate[roman]%
+  \isotwodigitdayfalse
+}
+\def\iso_at_isodash{-}%
+\DeclareRobustCommand*\isodash[1]{\def\iso_at_isodash{#1}}%
+\def\iso_at_twodigitsign{}
+\DeclareRobustCommand*\shortyearsign[1]{\def\iso_at_twodigitsign{#1}}%
+\def\iso_at_rangesign{\csname iso_at_rangesign@\iso_at_languagename\endcsname}%
+\DeclareRobustCommand*\isorangesign[1]{\def\iso_at_rangesign{#1}}%
+\newif\ifiso_at_printyear
+\DeclareRobustCommand*\printyearon{\iso_at_printyeartrue}
+\DeclareRobustCommand*\printyearoff{\iso_at_printyearfalse}
+\printyearon
+\newif\ifiso_at_cleanlook
+\DeclareRobustCommand*\cleanlookdateon{\iso_at_cleanlooktrue}
+\DeclareRobustCommand*\cleanlookdateoff{\iso_at_cleanlookfalse}
+\cleanlookdateoff
+\newcommand*\iso_at_printdate[3]{%
+  \begingroup%
+    \@ifundefined{iso_at_printdate@\iso_at_languagename}{%
+      \PackageWarning{isodate}{Language \iso_at_languagename\space unknown
+        to isodate.\MessageBreak
+        Using default format}%
+    }{}%
+    \year=#1 %
+    \month=#2 %
+    \day=#3 %
+    \today%
+  \endgroup%
+}
+\DeclareRobustCommand*\printdate[1]{%
+  \edef\iso_at_date{#1}%
+  \SubStringsToCounter{iso_at_slash}{/}{\iso_at_date}%
+  \SubStringsToCounter{iso_at_minus}{-}{\iso_at_date}%
+  \SubStringsToCounter{iso_at_dot}{.}{\iso_at_date}%
+  \ifthenelse{\equal{\theiso_at_dot}{2}}{%
+    \expandafter\iso_at_input@german\iso_at_date\@empty}{%
+    \ifthenelse{\equal{\theiso_at_minus}{2}}{%
+      \expandafter\iso_at_input@iso\iso_at_date\@empty}{%
+      \ifthenelse{\equal{\theiso_at_slash}{2}}{%
+        \expandafter\iso_at_input@english\iso_at_date\@empty}{%
+        ????\iso_at_isodash ??\iso_at_isodash ??%
+        \PackageError{isodate}{unrecognized date format}{Use one of
+          the following formats as macro argument:^^J%
+          \space\space dd.mm.yyyy^^J%
+          \space\space dd/mm/yyyy^^J%
+          \space\space yyyy-mm-dd^^J%
+          Don't use any spaces or commands like \protect\, or
+          \protect~ inside the argument.}%
+        }}}%
+}
+\def\iso_at_input@iso#1-#2-#3\@empty{\iso_at_printdate{#1}{#2}{#3}}
+\def\iso_at_input@german#1.#2.#3\@empty{\iso_at_printdate{#3}{#2}{#1}}
+\def\iso_at_input@english#1/#2/#3\@empty{%
+  \ifthenelse{\equal{\iso_at_inputformat}{tex}}{%
+    \iso_at_printdate{#1}{#2}{#3}%
+  }{%
+    \ifthenelse{\equal{\iso_at_inputformat}{american}}{%
+      \iso_at_printdate{#3}{#1}{#2}%
+    }{%
+      \iso_at_printdate{#3}{#2}{#1}%
+    }%
+  }%
+}
+\DeclareRobustCommand*\printdateTeX[1]{%
+  \edef\iso_at_date{#1}%
+  \SubStringsToCounter{iso_at_slash}{/}{\iso_at_date}%
+  \ifthenelse{\equal{\theiso_at_slash}{2}}{%
+    \expandafter\iso_at_input@TeX\iso_at_date\@empty}{%
+    ????\iso_at_isodash ??\iso_at_isodash ??%
+    \PackageError{isodate}{unrecognized date format}{Use one of
+      the following formats as macro argument:^^J%
+      \space\space dd.mm.yyyy^^J%
+      \space\space dd/mm/yyyy^^J%
+      \space\space yyyy-mm-dd^^J%
+      Don't use any spaces or commands like \protect\, or
+      \protect~ inside the argument.}%
+    }}
+\def\iso_at_input@TeX#1/#2/#3\@empty{\iso_at_printdate{#1}{#2}{#3}}
+\DeclareRobustCommand*\daterange[2]{%
+  \edef\iso_at_date{#1}%
+  \edef\iso@@date{#2}%
+  \edef\iso@@@date{\iso_at_date,\iso@@date}%
+  \SubStringsToCounter{iso_at_slash}{/}{\iso_at_date}%
+  \SubStringsToCounter{iso_at_minus}{-}{\iso_at_date}%
+  \SubStringsToCounter{iso_at_dot}{.}{\iso_at_date}%
+  \SubStringsToCounter{iso@@slash}{/}{\iso@@date}%
+  \SubStringsToCounter{iso@@minus}{-}{\iso@@date}%
+  \SubStringsToCounter{iso@@dot}{.}{\iso@@date}%
+  \ifthenelse{\equal{\theiso_at_dot}{2}\and\equal{\theiso@@dot}{2}}{%
+    \expandafter\iso_at_range@input_at_german\iso@@@date\@empty}{%
+    \ifthenelse{\equal{\theiso_at_minus}{2}\and\equal{\theiso@@minus}{2}}{%
+      \expandafter\iso_at_range@input_at_iso\iso@@@date\@empty}{%
+      \ifthenelse{\equal{\theiso_at_slash}{2}\and%
+                  \equal{\theiso@@slash}{2}}{%
+        \expandafter\iso_at_range@input_at_english\iso@@@date\@empty}{%
+        ????\iso_at_isodash ??\iso_at_isodash ??%
+        \PackageError{isodate}{unrecognized date format}{Use one of
+          the following formats as macro argument:^^J%
+          \space\space dd.mm.yyyy^^J%
+          \space\space dd/mm/yyyy^^J%
+          \space\space yyyy-mm-dd^^J%
+          Don't use any spaces or commands like \protect\, or
+          \protect~ inside the argument.^^J
+          Use the same format for both arguments.}%
+        }}}%
+}
+\def\iso_at_range@input_at_iso#1-#2-#3,#4-#5-#6\@empty{%
+  \begingroup
+    \@ifundefined{iso_at_daterange@\iso_at_languagename}{%
+      \PackageWarning{isodate}{Language \iso_at_languagename\space unknown
+        to isodate.\MessageBreak
+        Using default date range\MessageBreak
+        with range sign --}%
+        \expandafter\def\csname iso_at_printdate@\iso_at_languagename\endcsname{}%
+      \iso_at_printdate{#1}{#2}{#3}--\iso_at_printdate{#4}{#5}{#6}%
+    }{%
+      \ifthenelse{\equal{\number#1}{\number#4}}{}{\printyearon}%
+      \csname iso_at_daterange@\iso_at_languagename\endcsname{%
+        #1}{#2}{#3}{#4}{#5}{#6}%
+    }%
+  \endgroup
+}
+\def\iso_at_range@input_at_german#1.#2.#3,#4.#5.#6\@empty{%
+  \begingroup
+    \@ifundefined{iso_at_daterange@\iso_at_languagename}{%
+      \PackageWarning{isodate}{Language \iso_at_languagename\space unknown
+        to isodate.\MessageBreak
+        Using default date range\MessageBreak
+        with range sign --}%
+        \expandafter\def\csname iso_at_printdate@\iso_at_languagename\endcsname{}%
+      \iso_at_printdate{#3}{#2}{#1}--\iso_at_printdate{#6}{#5}{#4}%
+    }{%
+      \ifthenelse{\equal{\number#3}{\number#6}}{}{\printyearon}%
+      \csname iso_at_daterange@\iso_at_languagename\endcsname{%
+        #3}{#2}{#1}{#6}{#5}{#4}%
+    }%
+  \endgroup
+}
+\def\iso_at_range@input_at_english#1/#2/#3,#4/#5/#6\@empty{%
+  \begingroup
+    \@ifundefined{iso_at_daterange@\iso_at_languagename}{%
+      \PackageWarning{isodate}{Language \iso_at_languagename\space unknown
+        to isodate.\MessageBreak
+        Using default date range\MessageBreak
+        with range sign --}%
+        \expandafter\def\csname iso_at_printdate@\iso_at_languagename\endcsname{}%
+        \ifthenelse{\equal{\iso_at_inputformat}{tex}}{%
+          \iso_at_printdate{#1}{#2}{#3}--\iso_at_printdate{#4}{#5}{#6}%
+        }{%
+          \ifthenelse{\equal{\iso_at_inputformat}{american}}{%
+            \iso_at_printdate{#3}{#1}{#2}--\iso_at_printdate{#6}{#4}{#5}%
+          }{%
+            \iso_at_printdate{#3}{#2}{#1}--\iso_at_printdate{#6}{#5}{#4}%
+          }%
+        }%
+    }{%
+      \ifthenelse{\equal{\number#3}{\number#6}}{}{\printyearon}%
+      \ifthenelse{\equal{\iso_at_inputformat}{tex}}{%
+        \csname iso_at_daterange@\iso_at_languagename\endcsname{%
+          #1}{#2}{#3}{#4}{#5}{#6}%
+      }{%
+        \ifthenelse{\equal{\iso_at_inputformat}{american}}{%
+          \csname iso_at_daterange@\iso_at_languagename\endcsname{%
+            #3}{#1}{#2}{#6}{#4}{#5}%
+        }{%
+          \csname iso_at_daterange@\iso_at_languagename\endcsname{%
+            #3}{#2}{#1}{#6}{#5}{#4}%
+        }%
+      }%
+    }%
+  \endgroup
+}
+\newcounter{iso_at_slash}
+\newcounter{iso_at_minus}
+\newcounter{iso_at_dot}
+\newcounter{iso@@slash}
+\newcounter{iso@@minus}
+\newcounter{iso@@dot}
+\AtBeginDocument{%
+  \@tempswafalse
+  \@ifpackageloaded{babel}{%
+    \@tempswatrue
+    \typeout{isodate: babel.sty has been loaded}%
+  }{}%
+  \@ifpackageloaded{german}{%
+    \@tempswatrue
+    \typeout{isodate: german.sty has been loaded}%
+  }{}%
+  \@ifpackageloaded{ngerman}{%
+    \@tempswatrue
+    \typeout{isodate: ngerman.sty has been loaded}%
+  }{}%
+  \if_at_tempswa
+    \gdef\iso_at_languagename{\languagename}%
+    \edef\iso_at_tmplang{\languagename}%
+    \expandafter\selectlanguage\expandafter{\iso_at_tmplang}%
+  \else
+    \typeout{isodate: babel.sty, (n)german.sty have not been loaded}%
+    \csname date\iso_at_languagename\endcsname%
+  \fi
+}
+\endinput
+%%
+%% End of file `isodate.sty'.