export default (bigger, smaller)=>{
    var bigdate = null
    if(typeof bigger == "number")
    {
      bigdate = new Date(bigger);
    }
    else if(typeof bigger == "string")
    {
      bigdate = new Date(Number(bigger));
    }
    else
    {
      bigdate = bigger
    }

    var smalldate = null
    if(typeof smaller == "number")
    {
      smalldate = new Date(smaller);
    }
    else if(typeof smaller == "string")
    {
      smalldate = new Date(Number(smaller));
    }
    else
    {
      smalldate = smaller
    }

    var out = "";
    if(Math.abs(bigdate.getTime() - smalldate.getTime()) > 86400000)
    {
      out = ((bigdate.getTime() - smalldate.getTime()) / 86400000).toLocaleString(lang.region, {maximumFractionDigits:0, minimumFractionDigits:0}) + " " + lang.days
    }
    else if(Math.abs(bigdate.getTime() - smalldate.getTime()) > 3600000)
    {
      out = ((bigdate.getTime() - smalldate.getTime()) / 3600000).toLocaleString(lang.region, {maximumFractionDigits:0, minimumFractionDigits:0})+ " "+ lang.hours
    }
    else if(Math.abs(bigdate.getTime() - smalldate.getTime()) > 60000)
    {
      out = ((bigdate.getTime() - smalldate.getTime()) / 60000).toLocaleString(lang.region, {maximumFractionDigits:0, minimumFractionDigits:0})+ " "+ lang.mins
    }
    else 
    {
      out = lang.now
    }
    return out.replace(" "," ")
}