[mashup-dev] svn commit r12851 -
trunk/mashup/java/modules/core/src/org/wso2/mashup/webapp/utils
svn at wso2.org
svn at wso2.org
Thu Jan 24 16:04:07 PST 2008
Author: jonathan
Date: Thu Jan 24 16:04:05 2008
New Revision: 12851
Log:
Trimmed minutes off of the friendly date view if the event is more than 6 hours old.
Modified:
trunk/mashup/java/modules/core/src/org/wso2/mashup/webapp/utils/QueryParamUtils.java
Modified: trunk/mashup/java/modules/core/src/org/wso2/mashup/webapp/utils/QueryParamUtils.java
==============================================================================
--- trunk/mashup/java/modules/core/src/org/wso2/mashup/webapp/utils/QueryParamUtils.java (original)
+++ trunk/mashup/java/modules/core/src/org/wso2/mashup/webapp/utils/QueryParamUtils.java Thu Jan 24 16:04:05 2008
@@ -33,8 +33,10 @@
hours = ((now.getTime() - date.getTime()) / QueryParamUtils.ONEHOUR);
value += hours + "h ";
}
- long minutes = ((now.getTime() - date.getTime()) / QueryParamUtils.ONEMINUTE);
- value += (minutes - hours*60) + "m ago";
+ if (hours < 6) {
+ long minutes = ((now.getTime() - date.getTime()) / QueryParamUtils.ONEMINUTE);
+ value += (minutes - hours*60) + "m ago";
+ }
} else {
value = date.getDay() + " ";
More information about the Mashup-dev
mailing list