mirror of
https://github.com/Chouchen/ShikiryuRSS.git
synced 2025-09-05 13:04:32 +02:00
🚧 Add some validations and corrections
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Shikiryu\SRSS;
|
||||
|
||||
use DateTime;
|
||||
use DateTimeInterface;
|
||||
|
||||
class SRSSTools
|
||||
@@ -62,7 +63,7 @@ class SRSSTools
|
||||
}
|
||||
|
||||
if (count(explode(' ', $date)) === 2) {
|
||||
return \DateTime::createFromFormat('Y-m-d H:i:s', $date)->format(DateTimeInterface::RSS);
|
||||
return DateTime::createFromFormat('Y-m-d H:i:s', $date)->format(DateTimeInterface::RSS);
|
||||
}
|
||||
|
||||
[$j, $m, $a] = explode('/', $date);
|
||||
|
Reference in New Issue
Block a user