private function parseDates($data, $format)
    {
        foreach ($data as $key => $entry) {
            $data[$key]['date'] = $data[$key]['date']->format($format);
        }

        return $data;
    }
private function parseDates($data, $format)
    {
        foreach ($data as $key => $entry) {
            $data[$key]['date'] = $data[$key]['date']->format($format);
        }

        return $data;
    }
private function parseDates ( $ data , $ format ) { foreach ( $ data as $ key => $ entry ) { $ data [ $ key ] [ 'date' ] = $ data [ $ key ] [ 'date' ] -> format ( $ format ) ; } return $ data ; }
Parses dates according to a given format.

@param array $data
@param string $format

@return string
Parses dates according to a given format .