Skip to content
Snippets Groups Projects
Commit ab165a7f authored by Cornelius Amzar's avatar Cornelius Amzar Committed by Robert Lange
Browse files

Better implementation of getPlayingTimes in MarcAdvancedTrait (#1751)

parent 9a973cca
Branches
Tags
No related merge requests found
......@@ -291,12 +291,13 @@ trait MarcAdvancedTrait
$times = $this->getFieldArray('306', ['a'], false);
// Format the times to include colons ("HH:MM:SS" format).
for ($x = 0; $x < count($times); $x++) {
$times[$x] = substr($times[$x], 0, 2) . ':' .
substr($times[$x], 2, 2) . ':' .
substr($times[$x], 4, 2);
foreach ($times as $x => $time) {
if (!preg_match('/\d\d:\d\d:\d\d/', $time)) {
$times[$x] = substr($time, 0, 2) . ':' .
substr($time, 2, 2) . ':' .
substr($time, 4, 2);
}
}
return $times;
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment