mirror of
https://github.com/wiosna-dev/common-library.git
synced 2026-03-12 09:31:51 +01:00
DatePeriod - change namespace (Meritoo\Common\Utilities -> Meritoo\Common\Type) & extend BaseType
This commit is contained in:
@@ -12,6 +12,7 @@ use DateInterval;
|
||||
use DateTime;
|
||||
use Meritoo\Common\Exception\Date\UnknownDatePartTypeException;
|
||||
use Meritoo\Common\Type\DatePartType;
|
||||
use Meritoo\Common\Type\DatePeriod;
|
||||
|
||||
/**
|
||||
* Useful date methods
|
||||
@@ -72,7 +73,7 @@ class Date
|
||||
{
|
||||
$datePeriod = null;
|
||||
|
||||
if (DatePeriod::isCorrectPeriod($period)) {
|
||||
if ((new DatePeriod())->isCorrectType($period)) {
|
||||
$dateStart = null;
|
||||
$dateEnd = null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user