# Switch positions of startyear and endyear in moderntimeline

How can I switch in package moderntimeline the positions of startyear and endyear without breaking the layout?

Would be nice to have the startyear below and the endyear on top.

I'd like to simply change 2010 with 2007 in the following image:

-
Welcome to TeX.sx! A tip: You can use backticks  to mark your inline code as I did in my edit. – Kurt Nov 18 '12 at 23:28
Can you please compose a simple, minimal and complete document showing what exactly do you want to change? – Gonzalo Medina Nov 18 '12 at 23:40
Hope this screenshot is enough? Didn't think that a minimal or complete document will help to solve the problem!? – Megachip Nov 19 '12 at 0:14
@Megachip A MWE might not help to actually find the solution (although in some cases it actually does), but it certainly saves time. – Gonzalo Medina Nov 19 '12 at 0:31

You can produce the desired result by setting \tlwidth, \tltextstart, and \tltextend appropriately, as the following simple example shows:

\documentclass{moderncv}
\moderncvstyle{casual}
\usepackage[firstyear=1999,lastyear=2012]{moderntimeline}

\tltextstart[north]{\scriptsize}
\tltextend[south]{\scriptsize}
\tlwidth{-2pt}

\firstname{John}
\familyname{Doe}

\begin{document}

\makecvtitle

\tlcventry[cyan!60!black]{2007}{2010}{test}{test}{test}{}{test}

\tldatecventry[brown]{2011}{test}{}{test}{test}{}{test}

\end{document}


With the above solution the bars are below the timeline; to keep the bars above the timeline, instead of changing \tlwidth to a negative value, one can change the value for \tl@textstartabove:

\documentclass{moderncv}
\moderncvstyle{casual}
\usepackage[firstyear=1999,lastyear=2012]{moderntimeline}

\makeatletter
\pgfmathsetmacro\tl@textstartabove{\tl@width-2pt}
\makeatother

\tltextstart[north]{\scriptsize}
\tltextend[south]{\scriptsize}

\firstname{John}
\familyname{Doe}

\begin{document}

\makecvtitle

\tlcventry[cyan!60!black]{2007}{2010}{test}{test}{test}{}{test}

\tldatecventry[brown]{2011}{test}{}{test}{test}{}{test}

\end{document}
`

-