6

In the following MWE, \today prints the date in British format, e.g. 14th January 2013. However, \datedate prints the date as January 28, 2013. I wonder how the latter can be changed to the former.

\documentclass{article}
\usepackage{datenumber}
\usepackage[british]{babel}

\begin{document}

\today

\setdatetoday
\addtocounter{datenumber}{14}%
\setdatebynumber{\thedatenumber}%
In 14 days is \datedate

\end{document}
1
  • Thank you for your answer, which worked as expected. Much appreciated. By your request, I have accepted Heiko's answer. – Reza Jan 14 '13 at 22:17
6

Package datenumber knows some language options. It does not know british but english:

\documentclass{article}
\usepackage[english]{datenumber}
\usepackage[british]{babel}

\begin{document}

\today

\setdatetoday
\addtocounter{datenumber}{14}%
\setdatebynumber{\thedatenumber}%
In 14 days is \datedate.

\end{document}

Result

2

You can define your own command with the help of the engord package:

\documentclass{article}
\usepackage{datenumber}
\usepackage[british]{babel}
\usepackage{engord}

\engordraisefalse
\newcommand\mydatedate{%
\engord{dateday}~\datemonthname\ \thedateyear}

\begin{document}

\today

\setdatetoday
\addtocounter{datenumber}{14}%
\setdatebynumber{\thedatenumber}%
In 14 days is \datedate

In 14 days is \mydatedate

\end{document}

enter image description here

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.