Bug Tracker
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.
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
Download (620B)
\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.
Comments
0 comments.
Add Comment
Page permalink: https://www.dickimaw-books.com/bugtracker.php?key=61