style: how to always display yyyy/mm/dd date ?

Newsgator Forums
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



style: how to always display yyyy/mm/dd date ? Expand / Collapse
Author
Message
Posted 3/13/2008 1:33:42 AM
Rockstar

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
Post #37766
Posted 3/14/2008 9:39:24 AM
NewsGator

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
Post #37816
Posted 3/14/2008 10:44:33 AM
Rockstar

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)
Post #37826
Posted 4/9/2008 10:51:26 AM
Rockstar

Rockstar

Group: Forum Members
Last Login: 5/14/2008 8:48:54 AM
Posts: 125, Visits: 128
so, no real alternative for now ?

thanks
Post #38574
Posted 4/9/2008 11:47:07 AM
NewsGator

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

Post #38578
Posted 4/25/2008 6:14:35 AM
Rockstar

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>

Post #39169
Posted 5/7/2008 7:20:57 AM
Rockstar

Rockstar

Group: Forum Members
Last Login: 5/14/2008 8:48:54 AM
Posts: 125, Visits: 128
nobody on this xsl code ?

thanks
Post #39462
Posted 5/7/2008 8:41:45 AM


Forum Deity

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!
Post #39465
« Prev Topic | Next Topic »


All times are GMT -7:00, Time now is 1:01am

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.203. 8 queries. Compression Disabled.

NewsGator.com | Support | Developers | Partners | Press | Company
© Copyright 2003-2008  NewsGator Technologies, Inc. All Rights Reserved.
Copyright Information | Privacy Policy | Terms of Service
Microsoft Gold Certified Partner