@@ 657-668 (lines=12) @@ | ||
654 | * |
|
655 | * @return Date|null |
|
656 | */ |
|
657 | public function getTodaysOrderDate() |
|
658 | { |
|
659 | $a = $this->workOutSchedule(); |
|
660 | $today = strtotime(Date("Y-m-d")); |
|
661 | if (count($a)) { |
|
662 | foreach ($a as $orderDateInteger => $orderDateLong) { |
|
663 | if ($orderDateInteger == $today) { |
|
664 | return Date::create($className = "Date", $value = Date("Y-m-d", $orderDateInteger)); |
|
665 | } |
|
666 | } |
|
667 | } |
|
668 | } |
|
669 | ||
670 | /** |
|
671 | * Next date (from the viewpoint of today) |
|
@@ 680-691 (lines=12) @@ | ||
677 | return $this->getNextOrderDate(); |
|
678 | } |
|
679 | ||
680 | public function getNextOrderDate() |
|
681 | { |
|
682 | $a = $this->workOutSchedule(); |
|
683 | $today = strtotime(Date("Y-m-d")); |
|
684 | if (count($a)) { |
|
685 | foreach ($a as $orderDateInteger => $orderDateLong) { |
|
686 | if ($orderDateInteger > $today) { |
|
687 | return Date::create($className = "Date", $value = Date("Y-m-d", $orderDateInteger)); |
|
688 | } |
|
689 | } |
|
690 | } |
|
691 | } |
|
692 | ||
693 | ||
694 | /** |