4

Using datetime package in article class, how can I remove the ordinal (that is, st in 1st, nd in 2nd etc) from British dates, please. Here is a minimal example:

\documentclass[12pt]{article}
\usepackage{geometry}
\geometry{a4paper} 
\usepackage[level,long]{datetime}
...
\title{Testing the Boundaries}
\author{}
\date{}

gives

Wednesday 3rd May, 2017.

How can I remove the "rd"?

5

Rather use the newer datetime2 and change the language-specific ordinal setting to be omitted (other options are level, raise and sc; see the English language module documentation):

enter image description here

\documentclass{article}

\usepackage[british]{babel}
\usepackage[useregional,showdow]{datetime2}

\DTMlangsetup[en-GB]{ord=omit}

\title{A title}
\author{An author}

\begin{document}

\maketitle

\end{document}

You could also redefine \DTMenglishordinal to just print its argument (and not add anything else):

\renewcommand{\DTMenglishordinal}[1]{\number#1 }
| improve this answer | |
  • Or \DTMlangsetup[en-GB]{ord=omit} – Nicola Talbot May 4 '17 at 8:22
  • @NicolaTalbot: Ah. I honestly tried ord=none. :) – Werner May 4 '17 at 11:11
  • Sorry, in hindsight that would've been a better value :-) – Nicola Talbot May 4 '17 at 12:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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