I am writing a syllabus that has the course schedule in a table. I am using the \AdvanceDate
command in the \advdate
package to advance the date by two or five days. This works fine outside a table. Inside a table, it continues to advance relative to the original value of \today
set by the \SetDate
command instead of the value of \today
updated by the \AdvanceDate
command.
In other words, inside a table, \AdvanceDate
acts like \DayAfter
, which always resets \today
.
\documentclass{article}
\usepackage{datetime}
\usepackage{advdate}
\newdateformat{mydate}{\THEDAY\ \shortmonthname[\THEMONTH]}
\begin{document}
\SetDate[23/08/2016]
\mydate\today
\AdvanceDate[2] \mydate\today
\AdvanceDate[5] \mydate\today
\AdvanceDate[2] \mydate\today
\AdvanceDate[5] \mydate\today
\medskip
In table format:
\SetDate[23/08/2016]
\begin{tabular}{@{}l@{}}
\mydate\today \\
\AdvanceDate[2]\mydate\today \\
\AdvanceDate[5]\mydate\today \\
\AdvanceDate[2]\mydate\today \\
\AdvanceDate[5]\mydate\today \\
\end{tabular}
\end{document}