A quick note on Latex with datetime2, I wanted to add a Revision on my CV recently, and got a bit stuck with this package. I tried (again) chatgpt to fix this issue, and again, it failed. So, I just read the documentation, find the right options, and it was fixed.
%% header
\usepackage[calc,style=iso,showseconds,showzone]{datetime2}
%% document
\begin{document}
\today
\end{document}
It will display the date/time with the ISO8601 format.
2026-07-25T10:03:00Z
The idea here is to set few options while importing datetime2 module:
calc: Load thedatetime2-calcpackage. This will allow the day of week to be computed and allow you to use thepgfcalendaroffset style date formats in commands like\DTMdateas well as defining the commands described in Section 9. This option doesn’t take a value. It can’t be switched off. This option can’t be used in\DTMsetkeys. The default is to not load datetime2-calc;style=iso: Sets the current style using\DTMsetstylewhen thedatetime2package has finished loading. This also setsuseregional=falsebut that setting can be overridden later in the option list;showseconds: Boolean key to determine whether or not to show the seconds when the time is displayed;showzone: Boolean key to determine whether or not to show the date with commands that use\DTMdisplayor\DTMDisplay.
Here some references if you want to know more about this topic:
Top comments (0)