# Bug Tracker

ID 61🔗 2014-05-16 04:08:29 Closed (Fixed) datetime v2.59 Wrong date format if datenumber is loaded after datetime 13

## Description

The date format is wrong when datetime and datenumber are used at the same time, datenumber being loaded after datetime.

As can be tested with the joined MWE:

• When datenumber is not loaded, datetime displays the ordinal for 21, 22, 23 and 31 as 21^{st}, 22^{nd}, 23^{rd} and 31^{st}, as expected with UKenglish.
• When datetime is not loaded, datenumber displays the ordinal for 21, 22, 23 and 31 as 21st, 22nd, 23rd and 31st, as (almost) expected with UKenglish.
• When datenumber and datetime are loaded in this order, the error:
  ! You can't use the character 2' after \advance.
<argument> 2
015
l.21   \item \setdate{2015}{1}{21}

already reported in bug #13 arises.
• When datetime and datenumber are loaded in this order, the ordinal for 21, 22, 23 and 31 are displayed as:
• 21st, 22nd, 23rd and 31st by datenumber, as (almost) expected with UKenglish;
• 21^{th}, 22^{th}^{}, 23^{th} and 31^{th} by datetime, and that's wrong.

## MWE

\listfiles

\documentclass{article}
\usepackage{datetime}
\usepackage[english]{datenumber}
\begin{document}
\section{Package datenumber}
\begin{itemize}
\item \setdate{2015}{1}{21}
\datedate
\item \setdate{2015}{1}{22}
\datedate
\item \setdate{2015}{1}{23}
\datedate
\item \setdate{2015}{1}{31}
\datedate
\end{itemize}

\section{Package datetime}
\begin{itemize}
\item \newdate{21}{21}{1}{2015}
\displaydate{21}
\item \newdate{22}{22}{1}{2015}
\displaydate{22}
\item \newdate{23}{23}{1}{2015}
\displaydate{23}
\item \newdate{31}{31}{1}{2015}
\displaydate{31}
\end{itemize}
\end{document}


## Evaluation

  ! You can't use the character 2' after \advance.
<argument> 2
015
l.21   \item \setdate{2015}{1}{21}

I can't reproduce this error with your mwe (with either package ordering). My log file shows new package versions for some of the dependent packages (such as fmtcount) so it's possible this issue was with one of those packages.

21st, 22nd, 23rd and 31st by datenumber, as (almost) expected with UKenglish; - 21^{th}, 22^{th}^{}, 23^{th} and 31^{th} by datetime, and that's wrong.
Why is this wrong? This is the default behaviour of datetime. The two packages are completely independent. The settings of one don't influence the settings of the other. If you don't want the superscript, just use the level package option:
\usepackage[level]{datetime}

Since this produces the expected format without error in v2.60 I'll just closed this. Note that v2.60 is the last version of datetime.sty, which has now been replaced with datetime2.sty.

Name (optional):

Are you human? Please confirm the bug report ID (which can be found at the top of this page) or login if you have an account.

Comment:

You can use the following markup:

Block:

[pre]Displayed verbatim[/pre]
[quote]block quote[/quote]

In line:

[tt]code[/tt]
[file]file/package/class name[/file]
[em]emphasized text[/em]
[b]bold text[/b]
[url]web address[/url] [sup]superscript[/sup]
[sub]subscript[/sub]

Ordered list:
[ol]
[li]first item[/li]
[li]second item[/li]
[/ol]

Unordered list:
[ul]
[li]first item[/li]
[li]second item[/li]
[/ul]

You can use the Preview button to review your message formatting before submitting.