# Generate a sequence of dates in LaTeX

In LaTeX, I'd like to generate a sequence of dates, which repeats on Monday and Wednesday every week. The sequence should look like:

Mon 3/30
Wed 4/1
Mon 4/6
Wed 4/8
...


I have tried to use the datenumber package in LaTeX but to no avail. I would appreciate any help how to approach this problem. Thank you!

I have tested the program below:

\setdate{2015}{3}{30}
\newcommand{\pnext}{%
\thedateyear/%
\ifnum\value{datemonth}<10 0\fi
\thedatemonth/%
\ifnum\value{dateday}<10 0\fi
\thedateday%
\setcounter{dateday}{4}
\nextdate
}
\pnext, \pnext, \pnext, \pnext, \pnext


However, the output is:

2015/03/30 , 2015/03/05 , 2015/03/05 , 2015/03/05 , 2015/03/05

You should consider using advdate to advance dates:

March 30, 2015
April 2, 2015
April 6, 2015
April 9, 2015
April 13, 2015
April 16, 2015

\documentclass{article}

\newif\iffirst
\newcommand{\pnext}{%
\iffirst
\else
\global\firsttrue
\fi
\today
}

\begin{document}

\ThisYear{2015}\ThisMonth{3}\ThisDay{30}% Set date to March 30, 2015
\today\par
\pnext\par
\pnext\par
\pnext\par
\pnext\par
\pnext

\end{document}


You can adjust the output of \today by reading up on Date format in LaTeX.

• @jackyd: I've updated the answer slightly to use an alternating step (3 or 4 days). In your case, you're probably interested in a 2-day/5-day stepping pattern to retrieve a Mon/Wed schedule. – Werner Mar 31 '15 at 14:54