# Month Name in Upper case [duplicate]

Possible Duplicate:
How do I “unprotect” an argument?

I'm trying to print date at title page of a document as NOVEMBER 2012. I'm using the datetime package to format the date as month name-year, but I can not capitalize the month name.

Here is my shot:

\documentclass{minimal}
\usepackage{datetime}

\begin{document}
\newdateformat{mydate}{\monthname~\THEYEAR}
\MakeUppercase{\mydate\today}
\end{document}


This fails to capitalize the month name. I guess the reason is \today is redefined as a macro and there is a \protect somewhere in the chain of definitions. I realized that a possible workaround is not using datetime and defining \today by myself. But I wonder can anyone come up with a neat solution that uses datetime?

-

## marked as duplicate by Guido, egreg, Kurt, Thorsten, Andrew SwannNov 17 '12 at 18:46

– percusse Nov 17 '12 at 17:16
May I suggest small caps (\textsc{\today}) instead of uppercase? It definitely looks better, and it doesn't have this issue. (Actually, I can't think of a single use case in which I'd recommend uppercase rather than small caps.) – Federico Poloni Nov 17 '12 at 17:28

\MakeUppercase needs expandable commands. The macros of datetime are far from being expandable (protect macros, optional arguments, assignments, …). If you do not need the date in an expandable context, then the month names could be redefined as uppercase strings, e.g.:

\documentclass{minimal}
\usepackage{datetime}

\begin{document}
\newdateformat{mydate}{\monthname~\THEYEAR}
\begingroup
\makeatletter
\renewcommand*{\monthnameenglish}[1][\month]{%
\@orgargctr=#1\relax
\ifcase\@orgargctr
\PackageError{datetime}%
{Invalid Month number \the\@orgargctr}%
{Month numbers should go from 1 (January) to 12 (December)}%
\or JANUARY\or FEBRUARY\or MARCH\or APRIL\or MAY\or JUNE\or JULY%
\or AUGUST\or SEPTEMBER\or OCTOBER\or NOVEMBER\or DECEMBER%
\else
\PackageError{datetime}%
{Invalid Month number \the\@orgargctr}%
{Month numbers should go from 1 (January) to 12 (December)}%
\fi
}%
\mydate\today
\endgroup
\end{document}


-