Biblatex and entries with no date
You can add the following hooks to your preamble:
\newcommand{\mkbibnodate}{n\adddot d\adddot}
\AtEveryCitekey{\iffieldundef{labelyear}{\restorefield{labelyear}{\mkbibnodate}}{}}
\AtEveryBibitem{\iffieldundef{labelyear}{\restorefield{year}{\mkbibnodate}}{}}
With biber, you can achieve the same result with the source map:
\DeclareSourcemap{
\maps[datatype=bibtex]{
\map[overwrite=false]{
\step[fieldset=date,origfieldval,final]
\step[fieldset=eventdate,origfieldval,final]
\step[fieldset=origdate,origfieldval,final]
\step[fieldset=urldate,origfieldval,final]
\step[fieldset=eventyear,origfieldval,final]
\step[fieldset=origyear,origfieldval,final]
\step[fieldset=urlyear,origfieldval,final]
\step[fieldset=year,fieldvalue={n.d.},final]
\step[fieldset=sortyear,fieldvalue={0000}]
}
}
}
Both of these approaches are style-independent so they should work for authoryear
and any of its variants.
The above sourcemap is based on the default labelyear
specification:
\DeclareLabelyear{
\field{year}
\field{eventyear}
\field{origyear}
\field{urlyear}
}
Currently \DeclareLabelyear
does not support literal strings, but something like the following would be useful:
\DeclareLabelyear{
\field{year}
\field{eventyear}
\field{origyear}
\field{urlyear}
\literal{n.d.}
}
I've added a feature request for this at the biblatex github repository.
Please try biblatex 2.6/biber 1.6 development versions from SourceForge. This set up is now the default and there is a new localisation string "nodate" which defaults to "n.d." in all languages currently. \DeclareLabelyear
is now the more general:
\DeclareLabeldate{%
\field{date}
\field{event}
\field{orig}
\field{url}
\literal{nodate}
}
but you shouldn't need to worry about that unless you are a style author using this macro. With these versions, your example gives the following without any extra coding:
Changing the "nodate" localisation string for your language will change the "n.d." in both the references and citation.
\renewbibmacro*{date+extrayear}{%
\iffieldundef{year}
{\printtext[parens]{n.d.}}
{\printtext[parens]{\printdateextra}}}%
\renewbibmacro*{cite:label}{%
\iffieldundef{label}
{\printtext[bibhyperref]{\printtext{n.d.}}}
{\printtext[bibhyperref]{\printfield{label}}}}