From 783665ee6fa84aaa813db1f3beff6e0901c80c0d Mon Sep 17 00:00:00 2001 From: Akex Date: Thu, 4 Apr 2024 15:50:34 +0500 Subject: [PATCH] first attempt --- app/index.php | 9 +++++++++ app/repository/DiffDays.php | 12 ++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 app/repository/DiffDays.php diff --git a/app/index.php b/app/index.php index e69de29..5f4d6be 100644 --- a/app/index.php +++ b/app/index.php @@ -0,0 +1,9 @@ +setDate(2025, 12,31);; + +echo ("Lней от ".$startDate->format('d-m-y')." до ".$endDate->format('d-m-y')." : ".diffDays($startDate, $endDate)); + diff --git a/app/repository/DiffDays.php b/app/repository/DiffDays.php new file mode 100644 index 0000000..19cfd90 --- /dev/null +++ b/app/repository/DiffDays.php @@ -0,0 +1,12 @@ +diff($dateEnd); + return $interval->format('%a'); +} \ No newline at end of file -- GitLab