Feature Tracker 
ID | 43🔗 |
---|---|
Date: | 2016-11-16 10:35:29 |
Status | Open Sign in if you want to like this report. |
Category | datetime2 |
Summary | saved date conditionals |
Sign in to subscribe to notifications about this report.
Description
<a> and <b> are two saved dates.\DTMsavedifdiffdate{<a>}{<b>}{<if a!=b>}{<if a==b>} \DTMsavedifnewerdate{<a>}{<b>}{<if a newer than b>}{<if a not newer than b>}Here is the code (it is easy to add ifdifftime or ifdiffdatetime) :
\newcommand*\dtm@save@ifop[5]{{ \let\@tempa\@gobbletwo \ifcsundef{@dtm@#4@year}% {% \PackageError{datetime2}{Undefined date-time `#4'}{}% }{% \ifcsundef{@dtm@#5@year}% {% \PackageError{datetime2}{Undefined date-time `#5'}{}% }{% \def\@tempb##1,{% \def\@tempc{##1}% \ifx\@tempc\@nnil \let\@tempa\@secondoftwo \let\@tempb\@empty \else #1\ifnum\csname @dtm@#4@##1\endcsname#2\csname @dtm@#5@##1\endcsname \let\@tempa\@firstoftwo \def\@tempb####1\@nil,{}% \fi \fi \@tempb } \@tempb#3,\@nil,% } } \expandafter}\@tempa } \newcommand*\DTMsavedifdiffdate{% \dtm@save@ifop\unless={year,month,day}} \newcommand*\DTMsavedifnewerdate{% \dtm@save@ifop\@empty>{year,month,day}}
MWE
No mwe.tex
Evaluation
Comments
0 comments.
Add Comment
Page permalink: https://www.dickimaw-books.com/featuretracker.php?key=43