Using XSLT we are displaying the calender view on web. If month is June 2011 the display starts on wednesday (1st june) and display correctly upto 4thjune, but the june 5th starts on tuesday instead of sunday. Same problem comes for all the month.
But for august month it shows correctly.
If first day starts on monday, it displays correctly. I suspect the problem in below code.
<xsl:template match=“col”>
<xsl:variable name="colstart">
<xsl:value-of select="date" />
</xsl:variable>
<xsl:if test="$view='month'">
<xsl:variable name="filldays">
<xsl:choose>
<xsl:when test= "date:dayInWeek(string($colstart)) = '1'">6</xsl:when>
<xsl:when test= "date:dayInWeek(string($colstart)) = '2'">0</xsl:when>
<xsl:otherwise><xsl:value-of select="date:dayInWeek(string($colstart))-2"/></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:if test="date:dayInMonth(string($colstart)) = '01'">
<xsl:call-template name="for.loop">
<xsl:with-param name="count" select="$filldays"/>
<xsl:with-param name="nexttemplate">blankdays</xsl:with-param>
<xsl:with-param name="one" select="$colstart" />
</xsl:call-template>
</xsl:if>
</xsl:if>