|
|
|
Rockstar
Group: Forum Members
Last Login: 5/14/2008 8:48:54 AM
Posts: 125,
Visits: 128
|
|
the only used code i found in others stylesheets is:
<xsl:value-of select="dateDisplay"/>
but where is it defined ?
thanks
|
|
|
|
|
NewsGator
Group: Administrators
Last Login: Today @ 12:46:49 AM
Posts: 1,115,
Visits: 18,457
|
|
The 'dateDisplay' value is determined by FeedDemon. It's a string which is set to 'Today,' 'Yesterday', 'Monday', 'Last Week', etc., so you can't easily parse it to discover the actual date. You might be able to use the <pubDate> element, though, since it's output in RFC822 format.
Nick Bradbury
NewsGator, Inc.|Nick's Blog
|
|
|
|
|
Rockstar
Group: Forum Members
Last Login: 5/14/2008 8:48:54 AM
Posts: 125,
Visits: 128
|
|
no intermediate solution ?
dateDisplay returns a correct date except for the last week (today & co)
|
|
|
|
|
Rockstar
Group: Forum Members
Last Login: 5/14/2008 8:48:54 AM
Posts: 125,
Visits: 128
|
|
so, no real alternative for now ?
thanks
|
|
|
|
|
NewsGator
Group: Administrators
Last Login: Today @ 12:46:49 AM
Posts: 1,115,
Visits: 18,457
|
|
BlackCat (4/9/2008) so, no real alternative for now?Not unless you want to parse <pubDate>, no.
Nick Bradbury
NewsGator, Inc.|Nick's Blog
|
|
|
|
|
Rockstar
Group: Forum Members
Last Login: 5/14/2008 8:48:54 AM
Posts: 125,
Visits: 128
|
|
i try to make a new date base on dateDisplay with this
http://www.exslt.org/date/functions/time/index.html
there is an xml file for MSXML, sadly, include is not accepted by FD
$INCLUDE(date.msxsl.xsl)$
=> FD refuses to load styles
else, i get the following code (not tested)
<!-- review FD date to change today/yesterday in a correct date ... -->
<xsl:template name="check-date">
<xsl:param name="text"/>
<xsl:choose>
<xsl:when test="contains($text, 'today')">
<xsl:call-template name="date:time">
<xsl:with-param name="date-time" select="dd-mm-yyyy" />
</xsl:call-template>
<xsl:value-of select="substring-after($text, 'today')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$text"/>
<xsl:choose>
<xsl:when test="contains($text, 'yesterday')">
<!-- date:add-duration(date:date-time(), '-P1D') -->
<xsl:call-template name="date:add-duration">
<xsl:with-param name="duration1" select="string" />
<xsl:with-param name="duration2" select="string" />
</xsl:call-template>
<xsl:value-of select="substring-after($text, 'yesterday')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$text"/>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
|
|
|
|
|
Rockstar
Group: Forum Members
Last Login: 5/14/2008 8:48:54 AM
Posts: 125,
Visits: 128
|
|
nobody on this xsl code ?
thanks
|
|
|
|
|
Forum Deity
Group: Moderators
Last Login: Yesterday @ 10:23:51 AM
Posts: 1,606,
Visits: 1,455
|
|
Pretty much the only person you're going to hear from on XSL is Nick and I know he's been out of the office dealing with non-work related stuff.
Place your ad here!
|
|
|
|