summaryrefslogtreecommitdiffstats
path: root/core/js
diff options
context:
space:
mode:
authorAlessandro Cosentino <cosenal@gmail.com>2012-11-13 19:18:26 -0500
committerAlessandro Cosentino <cosenal@gmail.com>2012-11-13 19:18:26 -0500
commitaa917cfb1872e77970ffed5571b5a96dc1387525 (patch)
treec8296e666cf237dc96598dce859d750255b92554 /core/js
parentc353568ea09ef89e82c7b0f35b8d646b9c35005d (diff)
downloadnextcloud-server-aa917cfb1872e77970ffed5571b5a96dc1387525.tar.gz
nextcloud-server-aa917cfb1872e77970ffed5571b5a96dc1387525.zip
uncomment hours entries in relative date functions
Diffstat (limited to 'core/js')
-rw-r--r--core/js/js.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/core/js/js.js b/core/js/js.js
index 2b2a64d25f9..cb6b48b095e 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -641,7 +641,7 @@ if (!Array.prototype.map){
/**
* Filter Jquery selector by attribute value
- **/
+ */
$.fn.filterAttr = function(attr_name, attr_value) {
return this.filter(function() { return $(this).attr(attr_name) === attr_value; });
};
@@ -675,7 +675,8 @@ function formatDate(date){
return $.datepicker.formatDate(datepickerFormatDate, date)+' '+date.getHours()+':'+((date.getMinutes()<10)?'0':'')+date.getMinutes();
}
-/* takes an absolute timestamp and return a string with a human-friendly relative date
+/**
+ * takes an absolute timestamp and return a string with a human-friendly relative date
* @param int a Unix timestamp
*/
function relative_modified_date(timestamp) {
@@ -687,14 +688,14 @@ function relative_modified_date(timestamp) {
if(timediff < 60) { return t('core','seconds ago'); }
else if(timediff < 120) { return t('core','1 minute ago'); }
else if(timediff < 3600) { return t('core','{minutes} minutes ago',{minutes: diffminutes}); }
- //else if($timediff < 7200) { return '1 hour ago'; }
- //else if($timediff < 86400) { return $diffhours.' hours ago'; }
+ else if($timediff < 7200) { return '1 hour ago'; }
+ else if($timediff < 86400) { return $diffhours.' hours ago'; }
else if(timediff < 86400) { return t('core','today'); }
else if(timediff < 172800) { return t('core','yesterday'); }
else if(timediff < 2678400) { return t('core','{days} days ago',{days: diffdays}); }
else if(timediff < 5184000) { return t('core','last month'); }
- //else if($timediff < 31556926) { return $diffmonths.' months ago'; }
- else if(timediff < 31556926) { return t('core','months ago'); }
+ else if($timediff < 31556926) { return $diffmonths.' months ago'; }
+ //else if(timediff < 31556926) { return t('core','months ago'); }
else if(timediff < 63113852) { return t('core','last year'); }
else { return t('core','years ago'); }
}