Note that there are some explanatory texts on larger screens.

plurals
  1. POFormatting an RSS Feed Date and Time
    primarykey
    data
    text
    <p>I have an RSS Feed I used FeedRoll to create it an i am pulling it in via xslt into my site. My question is what formatting via javascript would I have to create to format my dates to not look like:</p> <p>December 04, 2013 05:00:00 am</p> <p><strong>and instead look like:</strong></p> <p>Dec 4, 2013 5:00PM</p> <p><strong>The script FeedRoll provides is:</strong></p> <pre><code>&lt;script language="JavaScript" src="http://www.feedroll.com/rssviewer/feed2js.php? src=http%3A%2F%2Frss.cnn.com%2Frss%2Fcnn_topstories.rss&amp;num=5&amp;date=y&amp;tz=+n/- n/'feed'&amp;utf=y" charset="UTF-8" type="text/javascript"&gt;&lt;/script&gt; </code></pre> <p><strong>which displays like this:</strong> <img src="https://i.stack.imgur.com/ugbs6.png" alt="enter image description here"></p> <p>It looks like this particular feed is driven by php and the offset set to: +n/-n/'feed' but this mean's nothing to me. <strong>How do I get the month to become shortened an the zero's aligned like what I am looking for above?</strong> </p> <p>I am assuming Javascript is the easiest way to go... logically i am stuck. </p> <p>****Update**** (here's how my stylesheet looks):</p> <pre><code> &lt;xsl:template name="news_feed"&gt; &lt;script language="JavaScript" src="{RSSSrc}" charset="UTF-8" type="text/javascript"&gt;&lt;/script&gt; &lt;/xsl:template&gt; &lt;xsl:template match="NewsPage"&gt; &lt;div class="news-block"&gt; &lt;div class="holder"&gt; Image goes here... &lt;div class="section"&gt; &lt;dl&gt; &lt;xsl:call-template name="news_feed"/&gt; &lt;/dl&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/xsl:template&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload