diff --git a/metadata/JikanPHP.Model.Common.DateProp.yml b/metadata/JikanPHP.Model.Common.DateProp.yml index c3fc4a8..ab03a03 100644 --- a/metadata/JikanPHP.Model.Common.DateProp.yml +++ b/metadata/JikanPHP.Model.Common.DateProp.yml @@ -1,8 +1,8 @@ JikanPHP\Model\Common\DateProp: properties: day: - type: '' + type: integer month: - type: '' + type: integer year: - type: '' + type: integer \ No newline at end of file diff --git a/metadata/JikanPHP.Model.Common.DateRange.yml b/metadata/JikanPHP.Model.Common.DateRange.yml index 05cca33..6715a8d 100644 --- a/metadata/JikanPHP.Model.Common.DateRange.yml +++ b/metadata/JikanPHP.Model.Common.DateRange.yml @@ -1,4 +1,10 @@ JikanPHP\Model\Common\DateRange: properties: - date: + string: type: string + from: + type: string + to: + type: string + prop: + type: array \ No newline at end of file diff --git a/model/Common/DateRange.php b/model/Common/DateRange.php index 2f5d38c..d2934d2 100644 --- a/model/Common/DateRange.php +++ b/model/Common/DateRange.php @@ -12,13 +12,60 @@ class DateRange /** * @var string */ - private $date; + private $string; + + /** + * @var string + */ + private $from; + + /** + * @var string + */ + private $to; + + /** + * @var DateProp[] + */ + private $prop; /** * @return string */ public function getDate(): string { - return $this->date; + return $this->string; + } + + /** + * @return string + */ + public function getFrom(): string + { + return $this->from; + } + + /** + * @return string + */ + public function getUntil(): string + { + return $this->to; + } + + /** + * @return DateProp + */ + public function getFromProp(): DateProp + { + return reset($this->prop); + } + + /** + * @return DateProp + */ + public function getUntilProp(): DateProp + { + return end($this->prop); } -} +} \ No newline at end of file