5

Using \formatdate from datetime, I can get a date properly formatted in multiple languages:

\formatdate{3}{4}{2012}

However, I would like to only use the day and month and leave the year behind. I've tried passing:

\formatdate{3}{4}{\empty}

but it doesn't work, as it expects a number.

How could I achieve that?

  • 1
    This is because datetime stores the day/month/year in counters. – Werner Sep 13 '12 at 19:59
6
\makeatletter

\def\formatdateny{\csname noyear\languagename\expandafter\endcsname\formatdate}
\def\noyearenglish#1, \the\@year{#1}
\let\noyearamerican\noyearenglish
\let\noyearbritish\noyearenglish
\def\noyearfrench#1\space\number\@year{#1}
\let\noyeargerman\noyearfrench
\let\noyearaustrian\noyeargerman
\let\noyearswedish\noyearfrench
\let\noyearbreton\noyearfrench
\def\noyearrussian#1\ \number\@year~\cyrg.{#1}
\def\noyearspanish#1\ de~\number\@year{#1}
\let\noyearcatalan\noyearspanish
\def\noyearbasque#1\number\@year.eko\space{#1}
% etc.

\makeatother


 \formatdateny{3}{4}{2012}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.