Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question

3 Answers 3

up vote 33 down vote accepted

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

share|improve this answer
1  
What about other languages? –  Tom Brito Dec 8 '12 at 23:43
    
@TomBrito: See How to generate the date in Portuguese? –  Werner Dec 9 '12 at 7:49
    
I am trying to simply change the / for . in the date format. I use \usepackage[num,german]{isodate} and \isodash{.} but the output of \today is still 28/12/2013. Why? All this in a scrlttr2 using \usepackage[LGR,T1]{fontenc}, \usepackage[latin9]{inputenc} and \usepackage{babel} if that information is important. –  Nikos Alexandris Dec 28 '13 at 12:20
    
I see that I was confused above. I now don't use isodash{} as I don't ask for an ISO format. However, I can't make it work (any change) for example with \numdate\today when I previously set, for example, \daymonthsepgerman{$\cdot$}%. Any hints? –  Nikos Alexandris Dec 28 '13 at 12:34
    
Well, I forgot to add the "german" option for scrlttr2 :-). It now works. –  Nikos Alexandris Dec 28 '13 at 13:04

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

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.