Latest news 2024-03-02: Ebook sale (3rd–9th March 2024): short story cybercrime fiction Unsocial Media free; short story noir crime fiction I’ve Heard the Mermaid Sing free; crime fiction novel The Private Enemy US$1.99; illustrated children’s story The Foolish Hedgehog US$0.99. For further details, see latest blog post.

Bug Tracker RSS feed

I’m currently working on a major new version of the datatool package. This may take a while. Please be patient. (Experimental version available for testing.)

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

Sign in to subscribe to notifications about this report.


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:


Download (620B)


\section{Package datenumber}
  \item \setdate{2015}{1}{21}
  \item \setdate{2015}{1}{22}
  \item \setdate{2015}{1}{23}
  \item \setdate{2015}{1}{31}

\section{Package datetime}
\item \newdate{21}{21}{1}{2015}
\item \newdate{22}{22}{1}{2015}
\item \newdate{23}{23}{1}{2015}
\item \newdate{31}{31}{1}{2015}


  ! You can't use `the character 2' after \advance.
  <argument> 2
  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:
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.



Add Comment

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.


You can use the following markup:


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

In line:

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

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

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

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

Page permalink: