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-12-22 05:26:53


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

result :
Sunday, December 22 2024, 05:26 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