[Tex/LaTex] *(n.d.)” in citation call-out – biblatex

biblatexciting

I have a problem with the bibliography for my project.

I have the following preamble:

\usepackage[backend=biber, style=authoryear,
  bibencoding=utf8]{biblatex}
\setlength\bibitemsep{0.5\baselineskip}
\addbibresource{Bibtex/mybib.bib}
\DeclareNameAlias{sortname}{last-first}
\DeclareNameAlias{default}{last-first}

However, this produces (Author(s), n.d.) in the citation call-out whenever there is no "year" typed in the bib entry. How can I remove this whenever a year is not available.

Best Answer

\renewbibmacro*{cite}{%
  \iffieldundef{shorthand}
    {\ifnameundef{labelname}
       {\usebibmacro{cite:label}%
        \setunit{\printdelim{nonameyeardelim}}}
       {\printnames{labelname}%
        \setunit{\printdelim{nameyeardelim}}}%
     \iffieldequalstr{labelyear}{nodate}
       {\printfield{extradate}}
       {\usebibmacro{cite:labeldate+extradate}}}
    {\usebibmacro{cite:shorthand}}}

Will not show the 'n.d.' in case no year is given, it will instead show nothing if the citation is the only work by the author or a letter if there are several works by that author. If you want the title to disambiguate several works by the same author, replace \printfield{extradate} with \iffieldundef{extradate}{}{\printfield[citetitle]{labeltitle}}.