# How do I modify @misc entry to allow for no year-field?

I want to cite various legal documents. It is fine to put all info in the title field. The document tend to have their date and year in the title so if I put something year field the date will be printed double. However, if I leave it empty I get "(n.d.)" at the end of the footnote and bibliography entry. If I put year={{}}, I get a space before the final dot of the footnote and two parenthesis at the end of the printed bibliography entry.

I've seen some similar questions but I didn't get anything to work. I'm using biblatex with backend=biber, style=authoryear.

It is possible to disable the 'n.d'/nodate behaviour either globally for all entry types or only for specific types with \DeclareLabeldate. The default definition

\DeclareLabeldate{%
\field{date}
\field{year}
\field{eventdate}
\field{origdate}
\field{urldate}
\literal{nodate}
}


writes 'n.d.' when none of the dates listed before is found. If you drop the \literal{nodate} from the definition, there won't be a 'n.d.'. In the MWE below the 'n.d.' is only dropped for @misc entries, all other types retain the default definition and therefore retain the 'n.d.' if no date is given (cf. the applebly @book).

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

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

\DeclareLabeldate[misc]{%
\field{date}
\field{year}
\field{eventdate}
\field{origdate}
\field{urldate}
}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{appleby,
author  = {Humphrey Appleby},
title   = {On the Importance of the Civil Service},
}
@misc{law,
title  = {Law Act 1980},
}
\end{filecontents}


If you cite more legal documents, you may want to look into fleshing out the available types @legal, @legislation and @jurisdiction that are treated as aliases for @misc by the standard styles. See also What is best practice re. handling legal sources with Biblatex/Biber for disciplines other than law?.