3

I have found questions where \today has been edited – but in such a way which I do not want to have. Yet, I do not know how to programme it.

If I write \today, I do not want to see something like this:

December 2, 2017

I would like to see something like this:

2nd December 2017

Note that this date format should be able to distinguish between 1st, 2nd, 3rd, 4th, etc.

The package nth with \nth{} might be useful.

Nemgathos
  • 545
  • 3
  • 15

3 Answers3

6

Here is an example, how to format the date according your needs. This snippet is adapted from this question.

\documentclass{article}
\usepackage[nodayofweek]{datetime}

\newdateformat{mydate}{\twodigit{\THEDAY}{ }[\THEMONTH], \THEYEAR}

\begin{document}

\today
\mydate

\end{document}
Martin
  • 276
6

The following does what you want

\documentclass[]{article}

\usepackage[super]{nth}

\month=2
\def\today{%
  \nth{\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
}
\begin{document}
\today
\end{document}

enter image description here

Skillmon
  • 60,462
6

With datetime2 and datetime2-english:

\documentclass{article}
\usepackage[en-GB]{datetime2}
\DTMlangsetup[en-GB]{ord=raise}
\begin{document}
\today
\end{document}

2nd December 2017

Nicola Talbot
  • 41,153