Change date style of APA MS Word bibliography

1.7k Views Asked by At

I am writing my thesis and my professor wants me to use the APA style. Here I have the problem, that it shows dates like this "DD. MM YYYY" However, I want it to be "DD.MM.YYYY".

Somehow it not only uses spaces in general, there is this single dot after the date. This means it is not a style I dont generylly like, but it seems to be buggy. Why?

I have looked through the xls file but just cannot find the exact problem. In the Harvard xml, it was easy because i just needed to change "spaces" to "dot"-templates. Here, however, they seem to use a recursive style and I have no clue, where I need to make changes.

I would very grateful if anyone could help me!

I use office365, and I tried changing the xls I found at C:\Users\$user\AppData\Roaming\Microsoft\Bibliography\Style\APASixthEditionOfficeOnline.xsl

Here (pastebin) is the original code from the part, where I believe the "spaces" and "dots" are put.

the parameters are:

  • format: which is either MY or DMY (depending if day field is put or not)

  • day, month and year: are the data of the souce

  • withDot is initially not set (at least I cant find it anywhere)

I you need any further information, please let me know.

UPDATE

Here is the complete bibliography style code from Windows.

Here is the selected code with all templates that I believe are called while formatting the date(s).

1

There are 1 best solutions below

2
On

It's not possible to reproduce the problem from what you posted, mainly because the template you refer to requires other templates.

In any case, if all you need is to produce two different formats of date, you could do this much more simply by:

<xsl:template name="formatDate">
    <xsl:param name="day"/>
    <xsl:param name="month"/>
    <xsl:param name="year"/>    
    <xsl:param name="format" />
    <xsl:choose>
        <xsl:when test="$format='DMY'">
            <xsl:value-of select="format-number($day, '00.')"/>
            <xsl:value-of select="format-number($month, '00.')"/>
            <xsl:value-of select="$year"/>
        </xsl:when>
        <xsl:when test="$format='MY'">
            <xsl:value-of select="format-number($month, '00.')"/>
            <xsl:value-of select="$year"/>
        </xsl:when>
        <xsl:otherwise>??</xsl:otherwise>
    </xsl:choose>
</xsl:template>

Examples of calling the template:

call:

<date>
    <xsl:call-template name="formatDate">
        <xsl:with-param name="format" select="'DMY'"/>
        <xsl:with-param name="day" select="5"/>
        <xsl:with-param name="month" select="3"/>
        <xsl:with-param name="year" select="2014"/>
    </xsl:call-template>
</date>

returns:

<date>05.03.2014</date>

call:

<date>
    <xsl:call-template name="formatDate">
        <xsl:with-param name="format" select="'MY'"/>
        <xsl:with-param name="month" select="7"/>
        <xsl:with-param name="year" select="1876"/>
    </xsl:call-template>
</date>

returns:

<date>07.1876</date>