Fix various code.

This commit is contained in:
James Cole
2023-12-21 05:15:46 +01:00
parent a445bc53cd
commit ebf4b00288
6 changed files with 66 additions and 46 deletions

View File

@@ -249,14 +249,9 @@ class ParseDateString
/**
* Returns true if this matches regex for xxxx-xx-DD:
*
* @param string $date
*
* @return bool
*/
protected function isDayRange(string $date): bool
{
$pattern = '/^xxxx-xx-(0[1-9]|[12]\d|3[01])$/';
$result = preg_match($pattern, $date);
if (false !== $result && 0 !== $result) {