--- a/src/main/resources/scripts/Utils.js Fri Aug 26 12:43:51 2011 -0400
+++ b/src/main/resources/scripts/Utils.js Fri Aug 26 12:44:21 2011 -0400
@@ -66,6 +66,20 @@
seconds = t - ((hours * 3600) + (minutes * 60));
return ((hours > 0)? Util.formatNumber(hours) + ":": "") + Util.formatNumber(minutes) + ":" + Util.formatNumber(seconds);
},
+
+ formatTime2 : function (timestamp) {
+ date = new Date(timestamp);
+ return date.getHours() + ':' + date.getMinutes() + ':' + date.getSeconds();
+ },
+
+ formatDate : function (timestamp) {
+ date = new Date(timestamp);
+ return (parseInt(date.getMonth()) + 1).toString() + '/' + date.getDate() + '/' + date.getFullYear();
+ },
+
+ formatDistance : function (meters) {
+ return Math.round(meters/10)/100 + ' km';
+ },
// Geolocation related functions