mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-13 18:38:48 +00:00
Fixed getting of dates in Česká televize Bridge
This commit is contained in:
parent
dee734d360
commit
9024dfd61a
@ -58,11 +58,11 @@ class CeskaTelevizeBridge extends BridgeAbstract
|
|||||||
return strtotime('today');
|
return strtotime('today');
|
||||||
} elseif (strpos($string, 'včera') !== false) {
|
} elseif (strpos($string, 'včera') !== false) {
|
||||||
return strtotime('yesterday');
|
return strtotime('yesterday');
|
||||||
} elseif (!preg_match('/(\d+).\s(\d+).(\s(\d+))?/', $string, $match)) {
|
} elseif (!preg_match('/(\d+).\s(\d+).(\s(\d+))?/u', $string, $match)) {
|
||||||
returnServerError('Could not get date from Česká televize string');
|
returnServerError('Could not get date from Česká televize string');
|
||||||
}
|
}
|
||||||
|
|
||||||
$date = sprintf('%04d-%02d-%02d', $match[3] ?? date('Y'), $match[2], $match[1]);
|
$date = sprintf('%04d-%02d-%02d', $match[4] ?? date('Y'), $match[2], $match[1]);
|
||||||
return strtotime($date);
|
return strtotime($date);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user