xslt-3.0formatdatetime

date-format, month without capital first letter


Can anyone explain why this:

<?xml version="1.0" encoding="UTF-8"?>
<root>
    <date>1990-02-03</date>
</root>

when this XSLT is applied:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
    <xsl:template match="date">
        <xsl:value-of select='format-date(., "[F], [D]. [Mn] [Y]", "DE", (), ())'/>
    </xsl:template>
</xsl:stylesheet>

has this output:

Samstag, 3. februar 1990

instead of the desired

Samstag, 3. Februar 1990

Capital first letter for the month. [MN] outputs FEBRUAR


Solution

  • Ah, [MNn] is the solution:

    <xsl:value-of select='format-date(., "[F], [D]. [MNn] [Y]", "DE", (), ())'/>