I would like to create a sequence of dates with weekly increments, which should be shown in a table environment.
I've been fiddling around with a code snippet posted in this forum (Generate a sequence of dates in LaTeX) which uses advdate for this purpose. However, when you use the commands inside a table environment, the date is no longer incremented.
Here you can see a minimal working example which shows the problem. Thanks in advance!
\documentclass{article}
\usepackage{advdate}
\newif\iffirst
\newcommand{\pnext}{%
\AdvanceDate[7]% Step 3 days ahead...
\iffirst
\AdvanceDate\global\firstfalse% ...maybe 4
\else
\global\firsttrue
\fi
\today
}
\begin{document}
\ThisYear{2015}\ThisMonth{3}\ThisDay{30}
%The output of the following sequence is correct:
\today\par
\pnext\par
\pnext\par
\pnext\par
\pnext\par
\pnext
%However, it no longer works when the date is used in a table environment.
\begin{table}[hbtp]
\centering
\begin{tabular}{ll}
\today\\
\pnext\\
\pnext\\
\pnext\\
\pnext\\
\end{tabular}
\end{table}
\end{document}

datenumberpackage. I can post a solution using that package if you like. – Alan Munn Sep 01 '15 at 18:29datenumberpackage, but it didn't work... – Thomas Sep 01 '15 at 18:35