# Format date without year

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?

-
This is because datetime stores the day/month/year in counters. –  Werner Sep 13 '12 at 19:59

\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}

-
Wonderful, thanks! Just have to mix it with your previous answer to make it expandable ;-) –  ℝaphink Sep 13 '12 at 20:02
actually it works for french but not english, update in a bit –  David Carlisle Sep 13 '12 at 20:03
Ah, so I'll have to declare all supported languages I guess… –  ℝaphink Sep 13 '12 at 20:19
Also, could you explain how it works please? :-) –  ℝaphink Sep 13 '12 at 20:21
Oh, I get it now. But English doesn't work for me still. –  ℝaphink Sep 13 '12 at 20:39