# Memoir class conflict with datetime

Hi I'm running into a warning when trying to call the datetime package within a document using the memoir class. MWE is:

\documentclass{memoir}
\usepackage{datetime}
\begin{document}
Hello World
\end{document}


This results in:

Package fmtcount Warning: \ordinal already defined use \FCordinal instead. on input line 450.


The conflict between fmtcount and memoir is well documented and the solution is, as suggested, to use \FCordinal in place of \ordinal. The problem I have is I am not calling \ordinal. It must be occurring within the datetime file (or similar). Can anyone advise how to address this.

-
–  egreg Feb 25 '14 at 20:29

According to the datetime change log, version 2.41 of datetime has fmtcount split out as a separate package:

New to version 2.41: Package has been split into two files: datetime.sty and fmtcount.sty. The latter file contains the definitions for all the macros that display the value of a counter (e.g. \ordinal, \octal). Extra macro \decimal added (like \arabic, but can pad it with leading zeroes.)

So, when you load datetime, it loads fmtcount, which identifies the "conflict". The following is taken from fmtcount.dtx:

2660:  \@ifundefined{ordinal}
2661:   {\let\ordinal\FCordinal}%
2662:   {%
2663:     \PackageWarning{fmtcount}%
2664:     {\string\ordinal \space already defined use

Prior to the above conditional, \FCordinal is defined and substituted if \ordinal doesn't already exist.
Note that this is only a warning, and the suggestion is to use \FCordinal rather than \ordinal. So, if that's a possibility, it should not be a problem.
(1) \ordinal is defined conditionally in fmtcount.dtx (see lines 2660-2666). It checks whether it already exists or not, and either overwrites it with \FCordinal or not (printing a warning; not an error). (2) If you want to avoid this warning in your .log, add \let\ordinal\relax before loading \usepackage{datetime}. –  Werner Feb 25 '14 at 19:20
@TomBrien: Note that use \let\ordinal\relax might cause problems (not tested) with memoir if they don't use the same interface/restrictions-of-use... –  Werner Feb 25 '14 at 19:30