GeneralNext year command?

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
manuavazquez
Posts: 9
Joined: Wed Nov 10, 2010 2:49 pm

Next year command?

Post by manuavazquez »

Hi,

with "\the\year" I can get the current year...but how can I get next year? I couldn't find any command and I don't know that much about counters and that kind of thing to do it.

Is there a simple way to do this? I just want to get

Course 2010/2011

or something like that.

Greetings!!
Last edited by manuavazquez on Wed Nov 10, 2010 7:46 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Next year command?

Post by gmedina »

Hi,

Code: Select all

\documentclass{article}

\newcommand\NextYear{%
  \advance\year by 1 \the\year\advance\year by -1}

\begin{document}

Course \the\year /\NextYear

\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
manuavazquez
Posts: 9
Joined: Wed Nov 10, 2010 2:49 pm

Re: Next year command?

Post by manuavazquez »

Thank you very much!! That did the trick.

Greetings!!
Post Reply