Black screen on iPhone on tabspage

On the first tab, I want to display the difference between Date in minutes. I can run the app on browser and android but on ios, I get a black screen.

If I don’t change the Date format I get NaN on the iPhone .

   let today = new Date();
   today = ConvertDateForIOS(today.toString());
   let someDay = new Date(date);
  someDay =  ConvertDateForIOS(someday.toString());
   let difDate = +someDay - +today;
  return Math.abs(Math.round(((diffDate % 86400000)%3600000)/60000));

    let arr = date.split(/[- : T]/);
   date = new Date(parseInt(arr[0]),parseInt(arr[1]),parseInt(arr[2]),parseInt(arr[3]),parseInt(arr[4]),parseInt(arr[5]));
    return date;

If I comment my code and rebuild the app, I can run the app on iphone.

I fixed the issue with this:

    let todayDate = new Date();
    var a = date.split(/[^0-9]/);
    var d = new Date ( parseInt( a[0]),parseInt( a[1])-1,parseInt( a[2]),parseInt( a[3]),parseInt( a[4]),parseInt( a[5]) );
    let difDate = (this.currentDate.getTime()-d.getTime())/60000;
    return Math.floor(difDate);

can’t you use some lib as moment for your time operation?