2

I am using datetime to automatically generate a schedule. The MWE at the moment allows me to list weeks (and dates of the beginning and the end of each weak). But I would like to combine this with specific meeting dates. So for instance, where I have:

Week 1, 09/04--09/08

Week 2, 09/11--09/15

I would like to include the specific dates for each week, e.g.:

Week 1, 09/04--09/08

  • Tuesday 09/06
  • Thursday 09/08

Week 2, 09/11--09/15

  • Tuesday 09/12
  • Thursday 09/14

I know how to generate both listing by date, and listing by week separately, but I'm not sure if I can combine the two, as above. Here's a MWE:

    \documentclass{article}
    \usepackage[mmddyyyy]{datetime}% http://ctan.org/pkg/datetime
    \usepackage{advdate}% http://ctan.org/pkg/advdate
       \newdateformat{syldate}{\twodigit{\THEMONTH}/\twodigit{\THEDAY}}
         \newsavebox{\MONDAY}\savebox{\MONDAY}{Mon}% Mon
         \newcommand{\week}[1]{%
         \paragraph*{\kern-2ex\quad #1, \syldate{\today} -         \AdvanceDate[4]\syldate{\today}:}% Set heading  \quad #1
         \ifdim\wd1=\wd\MONDAY
         \AdvanceDate[7]
         \else
         \AdvanceDate[7]
         \fi%
             }
    \begin{document}

    \SetDate[28/08/2017]

    \week{Week 01} 

    \week{Week 02}

    \end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.