I’m trying to type out the current month + year both in uppercase.
My current solution works like this:
1) Using “datetime” I call for the current month+year then
2) To make them uppercase I use “a custom” macro that replaces “month name” with my uppercase version
Here is a basic example of calling month and year together:
Code: Select all
\documentclass[a4paper,12pt]{article}
\usepackage[slovene]{babel}
\usepackage[utf8]{inputenc}
\usepackage{datetime}
\newdateformat{monthyeardate}{%
\monthname[\THEMONTH] \THEYEAR}
\begin{document}
\MakeUppercase{\monthyeardate\today} %not working :/
\monthyeardate\today
\end{document}
Code: Select all
%%%%%%%%%month’s uppercase %%%%%%%%%
\makeatletter
\renewcommand*{\monthnameslovene}[1][\month]{%
\@orgargctr=#1\relax
\ifcase\@orgargctr
\PackageError{datetime}%
{Invalid Month number \the\@orgargctr}%
{Month numbers should go from 1 (JANUAR) to 12 (DECEMBER)}%
\or JANUAR \or FEBRUAR \or MAREC \or APRIL \or MAJ \or JUNIJ \or JULIJ %
\or AVGUST \or SEPTEMBER \or OKTOBER \or NOVEMBER \or DECEMBER %
\else
\PackageError{datetime}%
{Invalid Month number \the\@orgargctr}%
{Month numbers should go from 1 (JANUAR) to 12 (DECEMBER)}%
\fi
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Best regards