date-format

<xsl:include href="../plugins/tenandtwo-xslt-processor/xsl/date.xsl" />

<xsl:call-template name="date-format">
    <xsl:with-param name="time" select="$time" />
    <xsl:with-param name="value" select="$value" />
    <xsl:with-param name="shift" select="$shift" />
    <xsl:with-param name="format" select="$format" />
</xsl:call-template>

TEST 1 :
date-format :

result :
2024-11-21 10:10:49


TEST 2 :
date-format :
– value = now
– format = l, F d Y, h:i A

result :
Thursday, November 21 2024, 10:10 AM


TEST 3 : PASS
date-format :
– value = today
– format = Y

result :
2024


TEST 4 : PASS
date-format :
– time = 1672531200
– format = Y-m-d

result :
2023-01-01


TEST 5 : PASS
date-format :
– value = 2024-01-01
– shift = +1 weeks
– format = Y-m-d

result :
2024-01-08