diff --git a/src/Actions/DiffDaysAction.php b/src/Actions/DiffDaysAction.php new file mode 100644 index 0000000000000000000000000000000000000000..c3ee3c28a3e86c759e6627eb79b4fbcc9f4f4fa7 --- /dev/null +++ b/src/Actions/DiffDaysAction.php @@ -0,0 +1,21 @@ +diff($dateEnd)->format('%a'); + } +} diff --git a/src/Controller/DiffDaysController.php b/src/Controller/DiffDaysController.php new file mode 100644 index 0000000000000000000000000000000000000000..7dc8cd80893a2738cbc5eec8998572c3bee67e7c --- /dev/null +++ b/src/Controller/DiffDaysController.php @@ -0,0 +1,26 @@ +serialise(); + return new JsonResponse($action->act($array['startDate'], $array['endDate'])); + } +} diff --git a/src/Requests/DiffDaysRequest.php b/src/Requests/DiffDaysRequest.php new file mode 100644 index 0000000000000000000000000000000000000000..95295fd7bba664592cb6358dac546176dd9d6ea7 --- /dev/null +++ b/src/Requests/DiffDaysRequest.php @@ -0,0 +1,29 @@ + new DateTimeImmutable($this->startDate), + 'endDate' => new DateTimeImmutable($this->endDate), + ]; + } +} \ No newline at end of file