mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-25 21:39:21 +00:00
Fix -1 year ago issue
This commit is contained in:
parent
b6e818dc00
commit
c819aaf716
@ -21,6 +21,11 @@ ComunicWeb.common.date = {
|
||||
* @return {String} The generated date
|
||||
*/
|
||||
diffToStr: function(difference){
|
||||
|
||||
//Check if difference is less than one second
|
||||
if(difference < 0)
|
||||
difference = 0;
|
||||
|
||||
//Calculate seconds
|
||||
var seconds = difference-Math.floor(difference/60)*60;
|
||||
var difference = (difference - seconds)/60;
|
||||
|
Loading…
Reference in New Issue
Block a user