1

I've been wondering if the following things are possible entirely within LaTeX using the datetime2 package (at the moment I'm using the python package and an external text file to create tables of dates using Python).

1) The first is to have a list of date ranges in the following manner. Given a specific start date, which might not be today, produce a set of date ranges covering successive weeks:

10-10-2016 --- 10-16-2016

10-17-2016 --- 10-23-2016 etc.

2) Producing a set of days of the week, say Monday, Wednesday, and Friday, for each of the ranges specified above. So something like

10-10-2016: Monday Wednesday Friday

10-17-2016: Monday Wednesday Friday etc.

I do have a working version using Python, but it would be nice to have everything within LaTeX. I've played around with datetime2 but can't see a way to do this, and perhaps datetime2 is not the appropriate package for this. Any thoughts would be most welcome.

  • I think pgfcalendar might be best for that (if you want a LaTeX solution). I've got some examples in Displaying a Calendar if you want to look at iterating over a set of dates. The pgfcalendar package is automatically loaded by datetime2-calc (or \usepackage[calc]{datetime2}) so you can use \pgfcalendar to produce the ranges and datetime2 to format the dates. – Nicola Talbot Jun 9 '16 at 15:50
  • 1
    I find the datenumber package very simple and useful, depending on what you are doing. – Alan Munn Jun 9 '16 at 15:56
  • Thanks Nicola and Alan. I'll follow up on those suggestions. – user3516417 Jun 9 '16 at 18:38

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.