-
-
Save sdepold/d1e5e0e7a66fc77930fe to your computer and use it in GitHub Desktop.
formatting dates with jquery.rss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$("#rss-styled").rss("http://www.recruiter.com/feed/career.xml", { | |
limit: 5, | |
dateFormatFunction: function (date) { | |
var realDate = new Date(date); | |
return realDate.getFullYear() + "-" + (realDate.getMonth() + 1) + "-" + realDate.getDate(); | |
}, | |
layoutTemplate: '<dl class="dl-horizontal">{entries}</dl>', | |
entryTemplate: '<dt><a href="{url}">{title}</a></dt><dd>{shortBodyPlain}[{author}@{date}]</dd>' | |
}).show(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment