diff --git a/app/index.php b/app/index.php index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..5f4d6befb7051cc98d0d69c00bbe117bb84fe1b0 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 0000000000000000000000000000000000000000..19cfd90ecfee3b78c0f082336185f8eb56f1f314 --- /dev/null +++ b/app/repository/DiffDays.php @@ -0,0 +1,12 @@ +diff($dateEnd); + return $interval->format('%a'); +} \ No newline at end of file