[Tex/LaTex] Capitalizing “forthcoming” in bibliography but not in citation

biblatexcapitalization

I'm citing a couple of forthcoming articles without a known publication date, so I want to have "forthcoming" instead of the year in both in-text citations and the bibliography. However, I want to have the word capitalized in the bibliography, but not in the citations.

I've included a mwe below. What I want is for the in-text citation to read "Author (forthcoming)", but for the bibliography entry to read "Author, A. (Forthcoming). Beta "

\documentclass{article}

\usepackage[
    backend=biber,
    style=authoryear-comp,
]{biblatex}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
    @misc{A01,
        author = {Author, A.},
        year = {2001},
        title = {Alpha},
    }

    @misc{A02,
        author = {Author, A.},
        year = {forthcoming},
        title = {Beta},
    }
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}

\textcite{A01}. \textcite{A02}

\printbibliography

\end{document}

Best Answer

A possible way would be to redefine the date+extrayear bib macro.

\renewbibmacro{date+extrayear}{
  \printtext[parens]{%
    \MakeCapital{\thefield{year}}%
    \printfield{extrayear}}
}

enter image description here