# Add place to the date in moderncv coverletter

Is it possible to automatically add a place to the date and print it in the upper right corner of my cover letter generated from moderncv. Here is a minimum working example

\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{classic}
\moderncvcolor{blue}
\usepackage{lipsum}

\usepackage[scale=0.75]{geometry}
\usepackage[english]{babel}
\usepackage{blindtext}
%%%%%%%%%%%%%%%%%%%
\usepackage{etoolbox}
\patchcmd{\makelettertitle}{\hfill}{}{}{}
\patchcmd{\makelettertitle}{\raggedleft}{\raggedright}{}{}

\familyname{XXXXXX}
\title{CV}
\email{XXXXXXXXXXXXXX@XXXX.XXX}

\begin{document}
\recipient{XXXX}{XXXX\\XXXXXXXXXXXX\\1234 XXXXXX\\XXXXXX}
\date{\today} % Letter date
\opening{blablabla,} % Opening greeting
\closing{blablabla} % Closing phrase
\enclosure[Im Anhang]{CV} % List of enclosed documents
\makelettertitle % Print letter title
\blindtext[3]
\makeletterclosing % Print letter signature
\clearpage
\end{document}


and the outcome:

The content of \date doesn't have to be a date per se. As such, specify your \date using something like

\date{Place name, January 01, 1984}


or

\date{%
\begin{tabular}[t]{l@{}}
Place name \\
January 01, 1984
\end{tabular}}


This will ensure a [t]op-aligned, multi-row placement of a date "object":

The above outputs stems from using the moderncv template with the above \date usages.

For a more complicated setup, you can insert the \@date as part of the recipient address. A complete copy-and-paste of the \makelettertitle would be okay if you wish to make a lot of changes, rather than patching using etoolbox:

\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{classic}
\moderncvcolor{blue}
\usepackage{lipsum}

\usepackage[scale=0.75]{geometry}
\usepackage[english]{babel}
\usepackage{blindtext}
%%%%%%%%%%%%%%%%%%%

\makeatletter

\renewcommand*{\makelettertitle}{%
% recompute lengths (in case we are switching from letter to resume, or vice versa)
\recomputeletterlengths%
% sender contact info
%\hfill%
\begin{minipage}{.5\textwidth}%
\raggedright% \raggedleft
\makebox[\textwidth][l]{\makebox[2\textwidth]{\bfseries\upshape\@firstname~\@lastname\hfill\normalfont\textcolor{black}{\@date}}}\@firstdetailselementfalse%
\collectionloop{phones}{% the key holds the phone type (=symbol command prefix), the item holds the number
\makenewline\csname\collectionloopkey phonesymbol\endcsname\collectionloopitem}%
\ifthenelse{\isundefined{\@extrainfo}}{}{\makenewline\@extrainfo}}%
\end{minipage}\\[1em]
% recipient block
\begin{minipage}[t]{.5\textwidth}
\raggedright%
{\bfseries\upshape\@recipientname}\\%
\end{minipage} \\[2em]
% date
%\hfill% US style
%  \\[1em]% UK style
%\@date\\[2em]% US informal style: "January 1, 1900"; UK formal style: "01/01/1900"
% opening
\raggedright%
\@opening\\[1.5em]%
% ensure no extra spacing after \makelettertitle due to a possible blank line
%  \ignorespacesafterend% not working
\hspace{0pt}\par\vspace{-\baselineskip}\vspace{-\parskip}}

\makeatother

\familyname{XXXXXX}
\title{CV}
\email{XXXXXXXXXXXXXX@XXXX.XXX}

\begin{document}
\recipient{XXXX}{XXXX\\XXXXXXXXXXXX\\1234 XXXXXX\\XXXXXX}
\date{\today} % Letter date
\opening{blablabla,} % Opening greeting
\closing{blablabla} % Closing phrase
\enclosure[Im Anhang]{CV} % List of enclosed documents

\makelettertitle % Print letter title
\blindtext[3]
\makeletterclosing % Print letter signature
\clearpage
\end{document}

• this is almost what I want. But the date and place are placed in front of the recipient. I want them to be placed ín front of my personal data. Jun 4, 2015 at 20:58
• @user2536125: Great. Can you please provide a minimal working example (MWE) so I know what you're referring to? Please click on the aforementioned link and read through it so you can supply a proper MWE. We want to copy-and-paste-and-compile what you supply and see exactly what you see. It should start with \documentclass and end with \end{document}.
– Werner
Jun 4, 2015 at 20:59
• The MWE is added. Jun 5, 2015 at 5:40