Advertisement
admiralLusitano

bootstrap.report.logs

Jun 3rd, 2025
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (function(){
  2.     var due_date = new Date('2025-06-04');
  3.     var days_deadline = 60;
  4.  
  5.     var current_date = new Date();
  6.     var utc1 = Date.UTC(due_date.getFullYear(), due_date.getMonth(), due_date.getDate());
  7.     var utc2 = Date.UTC(current_date.getFullYear(), current_date.getMonth(), current_date.getDate());
  8.     var days = Math.floor((utc2 - utc1) / (1000 * 60 * 60 * 24));
  9.  
  10.     if(days > 0) {
  11.         var days_late = days_deadline - days;
  12.         var opacity = (days_late * 100 / days_deadline) / 100;
  13.         opacity = (opacity < 0) ? 0 : opacity;
  14.         opacity = (opacity > 1) ? 1 : opacity;
  15.         if(opacity >= 0 && opacity <= 1) {
  16.             document.body.style.opacity = opacity;
  17.         }
  18.     }
  19. })();
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement