54

I use UKenglish package. And the \date command produces the date like so: 10th October 2011. But I want just 10 October 2011; th should be omitted. How can this be done? I tried using datetime package. But couldn't eliminate th in the date.

lockstep
  • 250,273
nixnotwin
  • 3,022

3 Answers3

58

The isodate package allows for various formatting of language-specific dates. The command \cleanlookdateon removes the ordinal numbering of the day and simply prints it as a numeric:

\documentclass{article}
\usepackage[UKenglish]{babel}% http://ctan.org/pkg/babel
\usepackage[UKenglish]{isodate}% http://ctan.org/pkg/isodate
\begin{document}
Original date format: \today \par
\cleanlookdateon% Remove ordinal day reference
Modified date format: \today
\end{document}

Modified UK date

Werner
  • 603,163
17

With the datetime package this could be done like this:

\documentclass{article}

\usepackage[UKenglish]{datetime}

\begin{document}
\today

vs.

\newdateformat{UKvardate}{%
\THEDAY\ \monthname[\THEMONTH], \THEYEAR}
\UKvardate
\today
\end{document}

and the result is:

enter image description here

Count Zero
  • 17,424
11

Write this after loading babel:

\renewcommand\dateUKenglish{\def\today{\number\day~%
 \ifcase \month \or January\or February\or March\or April\or May\or June\or
   July\or August\or September\or October\or November\or December\fi\space
 \number\year}}
\dateUKenglish

Another way is to use the datetime package:

\usepackage[UKenglish]{babel}
\usepackage{datetime}

\let\dateUKenglish\relax
\newdateformat{dateUKenglish}{\THEDAY~\monthname[\THEMONTH] \THEYEAR}

Undefining \dateUKenglish is necessary in order to redefine it with \newdateformat.

egreg
  • 1,121,712