1
0
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:
Shikiryu
2023-04-11 23:49:03 +02:00
parent 5de5993e2b
commit f1816dec0c
10 changed files with 48 additions and 26 deletions

View File

@@ -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);