I would like to compare the value of a \printfield
command in \ifthenelse
It seems printfield does not return the value so ifthenelse can't check it.
How can I access the value in a way that ifthenelse can use?
What I want to achieve is to check wether the value is greater than 9 (two-digit) and prepend a 0 if it is not.
Edit - MWE:
%Short literatur.bib
\begin{filecontents}{literatur.bib}
@Online{TEST2022,
author = {{Author}},
title = {Title},
url = {https://google.com},
urldate = {2022-06-02},
date = {2022},
keywords = {test},
}
\end{filecontents}
\documentclass{scrartcl}
\usepackage[ngerman]{babel}
\usepackage[backend=biber, labeldateparts=true, style=authortitle, isbn=false, dashed=false, maxnames=3, datezeroes=true]{biblatex}
\DeclareCiteCommand{\onlinezitat}[\mkbibfootnote]
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}
\setunit{\addnbspace}
online:
\bibhyperref{\printnames[author]{labelname}}
\setunit{\labelnamepunct}
\newunit
\printfield{labelyear}\printfield{extradate}
\printtext{(}\printfield{urlday}\printtext{.}\printfield{urlmonth}\printtext{.}\printfield{urlyear}\printtext{)}}
{\addsemicolon\space}
{\usebibmacro{postnote}}
\renewcommand{\bibfootnotewrapper}[1]{\bibsentence#1}
\addbibresource{literatur.bib}
\begin{document}
Hallo\onlinezitat{TEST2022}.
\end{document}