3

BibLaTeX seems to recommend1 the yyyy-mm-dd format for dates such as:

 date = {1989-03-12}

I have no objection to this format but I would like to be able to cite without printing the month and the day. With old BibTeX date fields, it was easy:

month = mar,
year = {1989},

So, I used to add \AtEveryBibitem{\clearfield{labelmonth}} to my .tex files.

How can I get rid of the month and the day with this new (BibLaTeX) format?

PS: I precise I cannot modify my .bib file.


1: BibLaTeX manual says : "If there is no date field in an entry, biblatex will also consider the fields year and month for backwards compatibility with traditional BibTeX." (p.34) which indicates that fields year and month are obsoletes with BibLaTeX.

  • \AtEveryBibitem{\clearfield{month} \AtEveryBibitem{\clearfield{day}} doesn't work? – karlkoeller Dec 7 '13 at 17:11
  • @karlkoeller No (sorry) – ppr Dec 7 '13 at 17:18
4

There is a package option date for controlling this:

date=year, short, long, terse, comp, iso8601 default: comp This option controls the basic format of printed date specifications.

\documentclass{article}

\usepackage[date=year]{biblatex}
\addbibresource{\jobname.bib}

\begin{document}
\nocite{*}

\printbibliography

\end{document}

with database entry

@Article{Author,
  author =   {Author, A.},
  title =    {A paper},
  journal =  {J. Jour.},
  date =     {1989-03-12}
}

yields

Sample output

  • Thanks! It is definitively the solution. For Debian users, you will have to wait the 2.8 version of BibLaTeX or update manually. – ppr Dec 7 '13 at 17:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.