Guest User

Untitled

a guest
Jan 18th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. int set = parseInt(this.userHandler.getBanTime(name));
  2. int time = (int) System.currentTimeMillis() / 1000;
  3. int diff = (set + 604800) - time;
  4.  
  5. int d = diff / 86400 % 7;
  6. int h = diff / 3600 % 24;
  7. int m = diff / 60 % 60;
  8. int s = diff % 60;
  9.  
  10. String msg = (d > 0 ? d + " dager, " : "") +
  11. (h > 0 ? h + " timer, " : "") +
  12. (m > 0 ? m + " minutter, " : "") +
  13. s + " sekunder igjen.";
Add Comment
Please, Sign In to add comment