Just a short note that could turn out to somebody somewhere: I'm by no means a LaTeX expert, but I like to use it for almost any text document I need to write. Since TeX is based on simple text files you can churn out text without having to think about the visual aspect of the document, but only its structure. Moreover, since every source file is just text, it is perfectly suited to be used with source control tools like Mercurial and such.
Apart from that, LaTeX can be extremely painful to work with: its syntax is quite obscure, documentation mostly lacking and it is based on hundreds of additional packages which on their own aren't documented very well, can conflict between themselves and sometimes don't work very well. However, after a couple of minutes of hammering on the TeX source, you usually get what you were looking for.
This is one of those cases: I wanted a simple command to compute the amount of years passed between a given (past) year and today. For instance, given the year 2004 as parameter, the command should generate (2011-2004) “7 years”. This enables you to compute the age or the elapsed time of a date and ensuring that the count is always updated when you recompile the document.
Again, I'm no LaTeX expert and the following command might be very very wrong. It works though, so that's what I put together:
\newcommand{\yearssince}[1]%
{\count1=\year \advance\count1 by -#1 \the\count1 \xspace{}}
The yearssince command essentially stores the current year in the count1 variable. It subtracts the parameter (which must be an integer year number) and the writes the resulting number. As simple as that. You can use the command like so:
I have been programming in C++ for at least \yearssince{2004} years.

During the last months I have been working a lot with the 






