# How to customize \printdate? [duplicate]

How to get the output as shown below by customizing \printdate?

Here is the minimal code

\documentclass[english]{article}
\usepackage[english]{isodate}

\begin{document}

\printdate{2017-05-12}

\end{document}

• @CarLaTeX That's a different package ... (Ah, didn't see your answer.) – Torbjørn T. May 4 '17 at 8:04
• @TorbjørnT. Indeed, I've marked as duplicate only after that the OP accepted my answer, but still I'm not sure... if you can find a solution with isodate maybe the question isn't a duplicate... – CarLaTeX May 4 '17 at 8:14
• Look at Nicola Talbot's comment to my answer (and my edit), thank you! – CarLaTeX May 4 '17 at 20:59

You can use datetime2 instead of isodate, I took the code from this post.

Edit:

Sorry, I copied the code without carefully reading the package documentation.

My previous code included useless instructions, as Nicola Talbot correctly pointed out.

I've simplyfied it:

\documentclass[english]{article}
\usepackage[en-GB]{datetime2}
\DTMlangsetup[en-GB]{ord=raise,monthyearsep={,\space}}

\begin{document}

\DTMdate{2017-05-12}

\end{document}


• Or just \DTMdate{2017-05-12} (instead of saving and using the date). – Nicola Talbot May 4 '17 at 14:18
• @NicolaTalbot Blame on me! I copied the code without reading the manual carefully, thank you! – CarLaTeX May 4 '17 at 14:35