[texhax] date format
Andree Jacobson
andree at cs.unm.edu
Sat May 31 07:13:52 CEST 2008
Here's another version:
\documentclass{article}
\usepackage[level]{datetime}
\usepackage{ifthen}
\newcommand{\lowershortmonthname}[1]%
{%
\ifthenelse{\equal{#1}{1}}{jan}{}%
\ifthenelse{\equal{#1}{2}}{feb}{}%
\ifthenelse{\equal{#1}{3}}{mar}{}%
\ifthenelse{\equal{#1}{4}}{apr}{}%
\ifthenelse{\equal{#1}{5}}{may}{}%
\ifthenelse{\equal{#1}{6}}{jun}{}%
\ifthenelse{\equal{#1}{7}}{jul}{}%
\ifthenelse{\equal{#1}{8}}{aug}{}%
\ifthenelse{\equal{#1}{9}}{sep}{}%
\ifthenelse{\equal{#1}{10}}{oct}{}%
\ifthenelse{\equal{#1}{11}}{nov}{}%
\ifthenelse{\equal{#1}{12}}{dec}{}%
}
\newdateformat{mydate}{\lowershortmonthname{\THEMONTH}
\ordinaldate{\THEDAY} \THEYEAR}
\mydate
\begin{document}
Show today's date: \today, and again \today,\\
and again \today.
\end{document}
/Andree
Schiller Judith 1541 EB wrote:
> hello,
>
> i'd like to look my \today date exactly like
>
> dec 12th 2008
>
> the month must consist of only 3 small letters and the "th" ("st", "nd"
> respectively) of the day must not be a superscript but on the same level
> like the rest. i played around with the datetime package and ifthenelse
> statements, but didn't succeed. any hints are very much appreciated!
>
> j.
> _______________________________________________
> TeX FAQ: http://www.tex.ac.uk/faq
> Mailing list archives: http://tug.org/pipermail/texhax/
> More links: http://tug.org/begin.html
>
> Automated subscription management: http://tug.org/mailman/listinfo/texhax
> Human mailing list managers: postmaster at tug.org
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : http://tug.org/pipermail/texhax/attachments/20080530/4f776b6d/attachment.bin
More information about the texhax
mailing list