# Edit \today in such a way that it displays 1st/2nd/3rd/4th, etc. Month Year

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.

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


• Is there a french version like fr-FR somewhere? With overleaf.com, it doesn't exist. – pzorba75 Dec 2 '17 at 18:21
• @pzorba75 The French version is provided with datetime2-french. I think there's just the regionless french support with that. – Nicola Talbot Dec 2 '17 at 19:51

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}


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}