I am trying to check if a post stored in a database is older then 1, 2, 3, and, finally, 4 days, respectively.

The table storing all of the posts has a date field. I have a query that retrieves the date and then I try to check if the date is older than 1, 2, 3 and 4 days, respectively and based on the result I want to move posts around the page. 

I have the following:

```
foreach($this->getArticleData() as $i)
{
    if(strtotime($i['date']) > strtotime('-1 day'))
    {
        $this->priority = '0.9';
    }
    elseif(strtotime($i['date']) > strtotime('-2 day'))
    {
        $this->priority = '0.8';
    }
    elseif(strtotime($i['date']) > strtotime('-3 day'))
    {
        $this->priority = '0.7';
    }
    else(strtotime($i['date']) > strtotime('-4 day'))
    {
        $this->priority = '0.6';
    }
}

```

I do not think that code is working properly. In some instances the priorities are wrong. I am I using srttotime() function is is there another more reliable way to do this?