# Odd date output from biblatex-apa

I am using biblatex-apa for my references and I have this enty in my .bib file:

@ONLINE{habitat,
TITLE = {Mission, Vision \& Values},
URL = {http://www.tchabitat.org/missionvisionvalues},
ORGANIZATION = {Twin Cities Habitat for Humanity website},
URLDATE = {2011-09-15}
}


The output shows the date of the reference as 'Retrieved 15 September 2011 from...'. Shouldn't the date be like the english date format, September 15th, 2011?

EDIT:

This is my preamble

\documentclass[letterpaper]{apa6e}
\usepackage{url}
\usepackage[margin=1in]{geometry}
\usepackage[american]{babel}
\usepackage{csquotes}
\usepackage[style=apa]{biblatex}
\DeclareLanguageMapping{american}{american-apa}
\bibliography{libros}

-
From the documentation: The ‘american’ babel option will give you APA compliant US date formats –  Peter Grill Sep 17 '11 at 18:08
I am using the 'american' babel option, as well as the recommended language definition in my preamble. –  ravl1084 Sep 17 '11 at 22:40
It seems like a bug in american-apa.lbx: the definition of \mkbibdateapalong is identical with that in french-apa.lbx. –  egreg Sep 17 '11 at 23:08
Interesting. @egreg would you be able to post the correct definition? I'm very new to latex, I read the files but I have no idea where or how to fix the definitions. –  ravl1084 Sep 18 '11 at 16:21
@ravl1084 Sorry, but it's quite complicated and it should be addressed by the package author. –  egreg Sep 18 '11 at 19:33

I've just uploaded version 3.6 to CTAN which should fix this. Thanks for spotting it. I realised that the APA 6th edition manual which I used to write the style has not one example of "Retrieved on" in chapter 7. So, it slipped by me. APA 5th edition had many. Strange really since the 6th edition is so focussed on "new media" formats ...

-
Thank you :). On a sidenote, I noticed the output is different for that same bib file when you use biber as a backend. Is this intended? –  ravl1084 Sep 20 '11 at 21:20
Quite possibly - the apa style uses some biber only features and it strongly recommended. In fact, the reason I got involved with biber development is precisely because there are APA style features that require things bibtex can't do (uniquelist). –  PLK Sep 21 '11 at 6:38
I am no expert in APA style, but with the above example I think the biber output is wrong. Like the reference date showing () instead of (n.d.). The citation is also different, showing the year of retrieval instead of n.d.. Again, I'm no expert but the output without biber looks more consistent to other references. But APA is meant to confuse us all, is it not? –  ravl1084 Sep 22 '11 at 22:05
You're right, something is wrong here - I am looking into it. –  PLK Sep 23 '11 at 15:47
The "()" is clearly wrong but the cite is correct - with biber you can specify a list of fields for labelyear and the biblatex default will make sure that labelyear is set to the url year if there is no real date. So, the citation will be the urlyear as it's set from labelyear. You need to change the labelyear definition if you don't want this (see \DeclareLabelyear in section 4.5.2 of the biblatex manual) –  PLK Sep 23 '11 at 15:55

To obtain an APA-compliant date (to my understanding) I modified the american-apa.lbx file. I changed the function \mkbibdateapalongdmy to read as follows

\protected\def\mkbibdateapalongdmy#1#2#3{%
\iffieldundef{#2}
{}
{\mkbibmonth{\thefield{#2}}}
\iffieldundef{#3}
{}
{\stripzeros{\thefield{#3}}}
\iffieldundef{#1}
{}
{\ifthenelse{\iffieldundef{#2}\OR\iffieldundef{#3}}
{}

Disclaimer: I succeeded in getting the output I wanted, but I cannot guarantee that this won't break something else. As far as I understand from reading the code, the \mkbibdateapalongdmy function is called for entries of type url and event but it might be used in other cases.