[Tex/LaTex] \the\year in Roman and \the\month in text

datetime

I would like to get the month in text e.g., June and the year in Roman, e.g. MMXIV when I call \the\month and \the\year

I also would like to avoid using any external package (I found some related questions, but all seem to be based on the datetime package):

\today month as text

Month Name in Upper case

How do I "unprotect" an argument?

Change \the\year

Best Answer

The following minimal example defines \MONTH and \YEAR that provides the output you're after:

enter image description here

\documentclass{article}
\newcommand{\MONTH}{%
  \ifcase\the\month
  \or January% 1
  \or February% 2
  \or March% 3
  \or April% 4
  \or May% 5
  \or June% 6
  \or July% 7
  \or August% 8
  \or September% 9
  \or October% 10
  \or November% 11
  \or December% 12
  \fi}
\makeatletter
\newcommand{\YEAR}{\@Roman{\the\year}}
\makeatother

\begin{document}

Month: \the\month, \MONTH \par
Year: \the\year, \YEAR

\end{document}