Pantheon\Terminus\Collections\Backups::getDayNumber PHP Method

getDayNumber() protected method

Retrieve an integer representing a the day of the week
protected getDayNumber ( string $day ) : integer
$day string The day of the week
return integer 0 = Sunday, 6 = Saturday
    protected function getDayNumber($day)
    {
        $days_of_the_week = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
        return array_search(date('l', strtotime($day)), $days_of_the_week);
    }