So if you just write out ./created_at without using the FormatDateTime extension around it do you then get anything returned? And if so what is the format like?
Think i have run into the same thing. I passed the created_at to javascript, did some work on it and passed it back. I was then able to render my tweet and some text like "this was posted 5 days ago on the xx of x 20xx". Hope this helps, will post some code if it is the sort of thing you need :)
Format Twitter 'Created_at' date in XSLT ?
Hi,
Is it possible to format the created_at date from a twitter XML stream?
I'm currently fetching some tweets in XSLT from this source:
https://api.twitter.com/1/statuses/user_timeline.xml?include_entities=false&include_rts=false&screen_name=aftermathematic&count=10
I can for-each thru all my tweets without a problem, but can't seem to be able to format the date, it just comes up empty then.
Here's what I have:
<xsl:value-of select="umbraco.library:FormatDateTime(./created_at, 'dd.MM.YYYY')"/>
Hi Jan
I believe that should be possible. Could you try posting all of the code so we can see the full context please? :)
Looking forward to hearing from you.
/Jan
Hi Jan,
this is my code:
<xsl:template match="/">
<xsl:variable name="twitterurl">https://api.twitter.com/1/statuses/user_timeline.xml?include_entities=false&include_rts=false&screen_name=xxxxxxx&count=10</xsl:variable>;
<xsl:variable name="tweets" select="document($twitterurl)/statuses/status"/>
<ul id="tweetticker">
<xsl:if test="count(document($twitterurl)/statuses/status) > 0">
<xsl:for-each select="$tweets">
<li>
<span><xsl:value-of select="./created_at" disable-output-escaping="yes"/></span>
<span><xsl:value-of select="umbraco.library:FormatDateTime(./created_at, 'dd.MM.YYYY')"/></span>
<p><xsl:value-of select="./text" disable-output-escaping="yes"/></p>
</li>
</xsl:for-each>
</xsl:if>
</ul>
</xsl:template>
still haven't figured out a possibility to format the created_at date....
Hi Jan
Sorry for the late reply.
So if you just write out ./created_at without using the FormatDateTime extension around it do you then get anything returned? And if so what is the format like?
/Jan
Hello,
Think i have run into the same thing. I passed the created_at to javascript, did some work on it and passed it back. I was then able to render my tweet and some text like "this was posted 5 days ago on the xx of x 20xx". Hope this helps, will post some code if it is the sort of thing you need :)
is working on a reply...