回答編集履歴
2
変数名変更
test
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
```php
|
2
2
|
|
3
|
-
$get_
|
3
|
+
$get_date = new DateTime('2020-01-01');
|
4
4
|
|
5
|
-
$end_
|
5
|
+
$end_date = new DateTime('2025-01-01');
|
6
6
|
|
7
7
|
$date = date('2020-01-01');
|
8
8
|
|
9
9
|
$year = intval($data['date']);
|
10
10
|
|
11
|
-
$get_year_number = $get_
|
11
|
+
$get_year_number = $get_date->diff($end_date);
|
12
12
|
|
13
13
|
$encode_year = $get_year_number->y;
|
14
14
|
|
1
変数ミス変更
test
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
$year = intval($data['date']);
|
10
10
|
|
11
|
-
$get_year_number = $
|
11
|
+
$get_year_number = $get_contract_date->diff($end_contract_date);
|
12
12
|
|
13
13
|
$encode_year = $get_year_number->y;
|
14
14
|
|