6

I am trying to use biblatex to format the reference to print the urldate in long form (Australian order) to match my university's style guide. I modified all the other fields using biblatex.cfg

I want the visited date to print the full date

Soto, S. 2013, Ubuntu documentation Install CD Customization, ed. by Community Help Wiki last edited 27 February 2013, visited on 25 September 2015, url: https://help.ubuntu.com/community/InstallCDCustomization.

My biblatex.cfg is

\ProvidesFile{biblatex.cfg}
\renewbibmacro*{date+extrayear}{%
  \iffieldundef{year}
    {}
    {\printtext{%
   \addperiod\space\printfield{labelyear}%
   \printfield{extrayear}}}}
\renewcommand*{\newunitpunct}{\addcomma\space}
\DeclareFieldFormat{urldate}{\bibstring{urlseen}\space{#1}\addcomma}
\renewbibmacro*{url+urldate}{%
\iffieldundef{urlyear}
  {}
  {\setunit*{\addspace}%
   \usebibmacro{urldate}}
\usebibmacro{url}}
\endinput

In my MWE files I have the following fields set

\documentclass{article}
\usepackage[style=authoryear, natbib=true, backend=biber, dateabbrev=false]{biblatex}
\begin{filecontents}{references.bib}
@Online{ubuntu-preseed-dvd,
Title                    = {Ubuntu documentation Install CD Customization},
Author                   = {Soto, S.},
Date                     = {2013-02-27},
Editor                   = {Community Help Wiki last edited 27 February 2013},
Url                      = {https://help.ubuntu.com/community/InstallCDCustomization},
Urldate                  = {2015-09-25}
}
\end{filecontents}
\addbibresource{references.bib}
\begin{document}
\cite{ubuntu-preseed-dvd}.
\printbibliography
\end{document}

Where the date is printed as 09/25/2015.

How can I get biblatex to print as 25 September 2015?

  • Try the option urldate=long. (Plus minus the well known "American date formatting puts the month first problem", which can be solved by not the British language, or Australian, see Formatting dates “day month year” with biblatex) – moewe Oct 17 '15 at 10:21
  • Exactly what I wanted. – stuie Oct 17 '15 at 10:48
6

Simply use urldate=long to get the expanded date format for URL dates, the default is the more compressed short you see at the moment.

If you want the months spelled out, you need dateabbrev=false as well (as commented by Florian), that option is independent of the generic abbreviate option that controls whether bibstrings are printed in full/long or short form.

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

\usepackage[style=authoryear, backend=biber, urldate=long, dateabbrev=false]{biblatex}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@online{appleby,
  author  = {Humphrey Appleby},
  title   = {On the Importance of the Civil Service},
  date    = {1980},
  url     = {https://example.com/gov/sir-humphrey/importance-civil-service},
  urldate = {2018-08-23},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}
\cite{appleby}
\printbibliography
\end{document}

Appleby, Humphrey (1980). *On the Importance of the Civil Service*. URL: https://example.com/gov/sir-humphrey/importance-civil-service (visited on 23rd August 2018).

Note that this example uses British and thus easily has the date order dd. mm. yyyy. See http://tex.stackexchange.com/q/129170/35864 if you want to stick to english or american or American spelling.

|improve this answer|||||
  • For more on getting the URL format to not use the American formatting see Formatting dates “day month year” with biblatex, DMY date and serial comma with Biblatex-chicago – moewe Oct 17 '15 at 11:00
  • 3
    urldate=long gave me "Apr." while I also needed dateabbrev=false to get "April" – Florian May 24 '18 at 19:03
  • @Florian Indeed the use of long or short month names (if names are used) is independent of the ...date format used and is controlled by dateabbrev (and not as one might think by the generic abbreviate option). – moewe May 24 '18 at 20:15
  • I though I'd put this here for others who might also be puzzled by a =long date still being abbreviated... – Florian May 24 '18 at 20:21

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.