[Tex/LaTex] Biblatex urldate – how to change parenthesis with square brackets

biblatex

I would like to produce a Reference list for online resource that ends with angular brackets for urldate. For example, I would like to have the following example end with "[Accessed 1st Apr. 2016]".

enter image description here

Here is the minimal working example:

\documentclass[12pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage[british]{babel}
\usepackage[left=2.00cm, right=2.00cm, top=2.00cm, bottom=2.00cm]{geometry}
\usepackage[backend=biber, citestyle=authoryear-ibid,bibstyle=authoryear, sorting=nty, urldate=long]{biblatex}
\usepackage[hidelinks]{hyperref}
\DefineBibliographyStrings{english}{urlseen = {Accessed }    
}
\usepackage{filecontents}
\begin{filecontents}{references.bib} 
@online{Jerald,
author = {Craig D. Jerald},
title = {School culture:'The hidden curriculum'},
year = {2006},
url = {<http://files.eric.ed.gov/fulltext/ED495013.pdf>},
organization = {The Center for Comprehensive School Reform and            Improvement},
urldate = {2016-04-01},
}
\end{filecontents}

\addbibresource{references.bib}

\begin{document}

Some statement \parencite{Jerald}.

\printbibliography[title={References}]
\end{document}

By browsing this site I got the information I need to tweak the following:

\DeclareFieldFormat{urldate}{\mkbibparens{\bibstring{urlseen}\space#1}}

It seems that I should replace \mkbibparens with a string that would specify square brackets, but I don't know what string that would be. I should emphasize that I don't want to change brackets style for year of publication or any other usage, just tweak the urldate presentation.

Best Answer

You can get (context sensitive) square brackets with \mkbibbrackets. It is the equivalent of \mkbibparens and switches the used brackets according to the nesting level.

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[british]{babel}
\usepackage[backend=biber, style=authoryear-ibid, urldate=long]{biblatex}
\usepackage[hidelinks]{hyperref}

\DeclareFieldFormat{urldate}{\mkbibbrackets{\bibstring{urlseen}\space#1}}

\DefineBibliographyStrings{english}{
  urlseen = {Accessed}    
}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib} 
@online{Jerald,
  author       = {Craig D. Jerald},
  title        = {School culture: 'The hidden curriculum'},
  year         = {2006},
  url          = {http://files.eric.ed.gov/fulltext/ED495013.pdf},
  organization = {The Center for Comprehensive School Reform and Improvement},
  urldate      = {2016-04-01},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}
Some statement \parencite{Jerald}.

\printbibliography
\end{document}

Jerald, Craig D. (2006). School culture: ’The hidden curriculum’. The Center for Comprehensive School Reform and Improvement. url: http://files.eric.ed.gov/fulltext/ED495013.pdf [Accessed 1st Apr. 2016].