There's a large list of packages related to dates and times in the “Calendars, Date and Time” section of the TeX Catalogue Topic Index  and on the calendar topic, timetable topic and date-time topic pages.
However, once you discount the plain TeX macros, the old LaTeX2.09 styles,
the packages that aren't included in TeX Live or MiKTeX, packages that don't
have English documentation and packages that don't have proper documentation
(just an example file or plain text file), then the list becomes much smaller
and can be divided into those that provide commands to: compute dates; display
calendars or timetables; display specific dates or times; or display the
current time or the current date in a particular format (by redefining
\today). Some of the packages cover more than one of these categories.
The datetime package, which can be used to display formatted dates
and the current time, was described in Volume 1
and so is not covered here. Similarly the babel
package , which also redefines
described in Volume 1. Since I started writing this book, I have
replaced datetime with datetime2, which uses some of
the code described in this chapter, so datetime2 is briefly
introduced in §7.1 The datetime2 Package.
Surprisingly none of the above CTAN date-related topics include the pgfcalendar package that comes with the pgf bundle . This is a useful date utility package that can be used for computing dates by adding or subtracting days from a given date. It also has commands that display month and week day names, so it can be used for parsing and formatting dates. In addition, since the pgf package's main function is graphical, pgfcalendar can be used to display calendars.
This chapter is arranged as follows:
- §7.1 The datetime2 Package briefly introduces the datetime2
- §7.2 The pgfcalendar Package Utility Commands describes the date utility
commands of the pgfcalendar package that can: parse a date, or
a date offset from another date, and convert it to a Julian day
number; convert a Julian day number into an ISO-date; determine the
week day from a Julian day number; test a date (for example, test if
the date is on a particular week day, or is earlier or later than
- §7.3 Displaying a Date describes how to display a date
using your own preferred format.
- §7.5 Displaying a Calendar describes how to use the
pgfcalendar package to display a calendar.
- §7.4 Parsing and Displaying Times describes how to parse and display times.
This book is also available as A4 PDF or 12.8cm x 9.6cm PDF or paperback (ISBN 978-1-909440-07-4).