Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi
As I am trying to document some of the XSLT extensions I just noticed something, which I am not sure is a bug or just me giving the wrong input.
When I write the following
<xsl:value-of select="umbraco.library:ShortTime('16-07-2009')"/>
It returns the following output: 00:00
I would have expected to get the current time like 21:48 instead?
Could this be because I am using the danish culture? If I use the CurrentDate() extension the correct time is returned.
I have been using the same dateformat as the one mentioned above with the GetWeekDay() extension and that works fine.
So I am wondering wether I am providing the date in the wrong format or if the extension is a bit buggy.
/Jan
Jan -
I think this is because you're passing the short date format as the argument. I believe if you pass in a full date-time string you'll get just the short time part returned and formatted.
-Paul
Ah yes off course. You are absolutely right Paul. Thanks :)
Just for the next guy:
<xsl:value-of select="umbraco.library:ShortTime(umbraco.library:CurrentDate())"/>
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Bug in the ShortTime XSLT extension?
Hi
As I am trying to document some of the XSLT extensions I just noticed something, which I am not sure is a bug or just me giving the wrong input.
When I write the following
<xsl:value-of select="umbraco.library:ShortTime('16-07-2009')"/>
It returns the following output: 00:00
I would have expected to get the current time like 21:48 instead?
Could this be because I am using the danish culture? If I use the CurrentDate() extension the correct time is returned.
I have been using the same dateformat as the one mentioned above with the GetWeekDay() extension and that works fine.
So I am wondering wether I am providing the date in the wrong format or if the extension is a bit buggy.
/Jan
Jan -
I think this is because you're passing the short date format as the argument. I believe if you pass in a full date-time string you'll get just the short time part returned and formatted.
-Paul
Ah yes off course. You are absolutely right Paul. Thanks :)
Just for the next guy:
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.