[Tex/LaTex] How to (properly) remove the parentheses around the year in authoryear style? (v2)

biblatex

I have the same question as asked in How to (properly) remove the parentheses around the year in authoryear style?. The accepted answer, however, no longer works (presumable due to some update to biblatex). What would the current solution be?

\documentclass{article}

\usepackage[style=authoryear]{biblatex}
\usepackage{xpatch,filecontents}

\begin{filecontents}{\jobname.bib}
@misc{A01,author={Author, A.},year={2001},title={Alpha}}
@misc{A02,author={Author, A.},year={2001},title={Beta}}
\end{filecontents}
\addbibresource{\jobname.bib}
\xpatchbibmacro{date+extrayear}{%
  \printtext[parens]%
}{%
  \setunit{\addperiod\space}%
  \printtext%
}{}{}
\begin{document}
\nocite{*}
\printbibliography
\end{document}

enter image description here

Best Answer

Replace

\xpatchbibmacro{date+extrayear}{%
  \printtext[parens]%
}{%
  \setunit{\addperiod\space}%
  \printtext%
}{}{}

with

\xpatchbibmacro{date+extrayear}{%
  \printtext[parens]%
}{%
  \setunit*{\addperiod\space}%
  \printtext%
}{}{}

MWE:

\documentclass{article}

\usepackage[style=authoryear]{biblatex}
\usepackage{xpatch,filecontents}

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

\xpatchbibmacro{date+extrayear}{%
  \printtext[parens]%
}{%
  \setunit*{\addperiod\space}%
  \printtext%
}{}{} 

\begin{document}
\nocite{*}
\printbibliography
\end{document} 

Output:

enter image description here