Change \the\year

TeX initializes \day, \month, \year and \time at the beginning of a job; they are internal integer registers that can be assigned new values. However, there is no LaTeX interface for modifying their values, so the primitive TeX assignment style has to be used: thus

\year=2012

will do, and similarly for the other registers mentioned above. Leave a space (or end of line) after the value, or append \relax to be sure.

Note that \time is initialized with the number of minutes past midnight when the job started. The initial values of \day, \month and \year are the expected ones.

You can print their values by prefixing the register's name with \the, as described in The \the command.


Just for fun, a quick LaTeX interface to the year:

\documentclass{article}

\makeatletter
\let\c@year\year
\makeatother
\newcommand*{\theyear}{\Roman{year}}

\setcounter{year}{2012}

\begin{document}
\theyear
\end{document}

Result


Just for fun, without a TeX primitive:

\documentclass{article}
\usepackage{advdate}
\begin{document}
\ThisYear{1492}      Christopher Columbus discovers America in \the\year. \par
\AdvYear{509}        {\em\the\year: A Space Odyssey} was a film made in% 
\AdvYear{-33}        \the\year. \par 
\SetDate[20/07/1969] Man takes first steps on the Moon in \today. \par
\AdvanceDate[16403]  But today is \today.
\end{document}