Calling an asyncronic function in a for loop

Have a for loop:

for(let i=1;i<=lastday-1;i++){
if(i===findEventDato(i,manadur,ar).then(date=>Number(date)))
.....
}

function findEventDato(edagur,emanadur,ear) {

     fetch('../connection/data_events.php').then(

        function(response) {

            return response.json();

        }

    ).then( (data)=>{

        var j=0;

        for(j=0;j<data.length;j++){

            if(data[j].dagur==edagur && data[j].manadur==emanadur && data[j].ar==ear){

       var dummy=Number(data[j].dagur);

        return dummy;

            }

        }})

    }

the function return the correct values (have used console.log(date), but the i===date does not work.