Author: haint
Date: 2011-09-30 04:04:01 -0400 (Fri, 30 Sep 2011)
New Revision: 7570
Modified:
portal/trunk/gadgets/eXoGadgets/src/main/webapp/gadgets/rssAggregator/script.js
Log:
GTNPORTAL-2127 RSS Gadget Display time in correct format
Modified: portal/trunk/gadgets/eXoGadgets/src/main/webapp/gadgets/rssAggregator/script.js
===================================================================
---
portal/trunk/gadgets/eXoGadgets/src/main/webapp/gadgets/rssAggregator/script.js 2011-09-30
00:36:24 UTC (rev 7569)
+++
portal/trunk/gadgets/eXoGadgets/src/main/webapp/gadgets/rssAggregator/script.js 2011-09-30
08:04:01 UTC (rev 7570)
@@ -44,43 +44,7 @@
return "an indeterminate amount of time ago"
}
time = (new Date().getTime()*1000 - B) / 1000;
- if (time < 60) {
- return "less than a minute ago"
- } else {
- if (time < 120) {
- return "about a minute ago"
- } else {
- if (time < 3600) {
- var A = Math.round(time / 60);
- return "about " + A + " minutes ago"
- } else {
- if (time < 7200) {
- return "about an hour ago"
- } else {
- if (time < 86400) {
- var A = Math.round(time / 3600);
- return "about " + A + " hours ago"
- } else {
- if (time < 172800) {
- return "about a day ago"
- } else {
- if (time < 2592000) {
- var A = Math.round(time / 86400);
- return "about " + A + " days ago"
- } else {
- if (time < 5184000) {
- return "about a month ago"
- } else {
- var A = Math.round(time / 2592000);
- return "about " + A + " months
ago"
- }
- }
- }
- }
- }
- }
- }
- }
+ return (new Date(B).toLocaleString());
}
RssAggregator.prototype.renderFeed = function(feedObj) {