[Tex/LaTex] \today month as text

datetime

I have this code:

\documentclass{article}
\usepackage[a5paper]{geometry}
\usepackage[ddmmyyyy]{datetime}
\renewcommand{\dateseparator}{.}
\begin{document}
\today
\end{document}

Prints:

enter image description here

How can I make it print this:

07 May, 2013

Best Answer

From the datetime manual, you have two solutions:

  • either use the predefined shortdate format, which will print "07th may, 2013";
  • or define a new date format to get rid of the ordinal as well.

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

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

\begin{document}

\shortdate
\today

\mydate
\today
\end{document}

enter image description here