mirror of
https://github.com/Chouchen/ShikiryuRSS.git
synced 2026-11-17 01:01:18 +01:00
🚧 Add some validations and corrections
This commit is contained in:
1 parent
5de5993e2b
commit
f1816dec0c
10 files changed
+48
-26
No files matched your search
+2
-1
@@ -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