When I print the references, the entry shows the urldate instead of no date. How can I suppress the urldate?
bibliography.bib:
@misc{test,
title = {Test},
url = {https://tex.stackexchange.com},
urldate = {2022-11-17},
author = {{SL}}
}
Result: Test (2022) Expected: Test (n. d.)
packages:
\usepackage[style=authoryear,giveninits,uniquename=init,maxbibnames=6,urldate=long,backend=biber]{biblatex}
\renewcommand*{\nameyeardelim}{\addcomma\space}
\DeclareFieldFormat{url}{Available at\addcolon\space\url{#1}}
\DeclareFieldFormat{urldate}{(Accessed: #1)}
I tried the following solutions: src
\DeclareLabeldate{\field{date}\field{eventdate} \field{origdate}\literal{nodate}}
Which leads to n. d. for entries with valid year field
and this solution
MWE.tex:
\documentclass{article}
\begin{filecontents*}{test.bib}
@book{mybook,
title = {Book title},
author = {Myself, Me},
year = {2020},
}
@misc{test,
title = {Test},
url = {https://tex.stackexchange.com},
urldate = {2022-11-17},
author = {{SL}}
}
\end{filecontents*}
\usepackage[style=authoryear,giveninits,uniquename=init,maxbibnames=6,urldate=long,backend=biber]{biblatex}
\renewcommand*{\nameyeardelim}{\addcomma\space}
\DeclareFieldFormat{url}{Available at\addcolon\space\url{#1}}
\DeclareFieldFormat{urldate}{(Accessed: #1)}
\addbibresource{test.bib}
\begin{document}
Hello \cite{test} and \cite{mybook}
\printbibliography[title=References]
\end{document}
