my does not work after this, I have used for loop to count days an employee worked it does not show any err, after this other lines don’t get executed

  angular, javascript, typescript
for(var i =0; i<attendance_records.length; i++){

var arrival=attendance_records[i].AttTime.split(":");
var arrival_minutes=parseInt(arrival[0])*60+parseInt(arrival[1]);
var out=attendance_records[i+1].AttTime.split(":")?attendance_records[i+1].AttTime.split(":"):0;
var out_minutes=parseInt(out[0])*60+parseInt(out[1]);
if(out_minutes-arrival_minutes>=60*6){


    this.days_worked+=1;
    console.log(this.days_worked);
}else{
if(out_minutes-arrival_minutes<60*6 && out_minutes-arrival_minutes>=60*4 ){


    console.log("second");
    this.days_worked+=0.5;
   }
}

}

this is my code please check if there is something wrong with it logically

Source: Angular Questions

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.