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