Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iqdevTranningProgram
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Адлан Шамавов
iqdevTranningProgram
Merge requests
!6
Ptps controller 6
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Ptps controller 6
PTPS_Controller_6
into
main
Overview
4
Commits
14
Pipelines
0
Changes
8
4 unresolved threads
Hide all comments
Merged
Адлан Шамавов
requested to merge
PTPS_Controller_6
into
main
11 months ago
Overview
4
Commits
14
Pipelines
0
Changes
2
4 unresolved threads
Hide all comments
Expand
0
0
Merge request reports
Compare
version 8
version 12
a36bd71e
11 months ago
version 11
ac4beafa
11 months ago
version 10
ac4beafa
11 months ago
version 9
9448460d
11 months ago
version 8
6220a9dd
11 months ago
version 7
5f66fef1
11 months ago
version 6
5f66fef1
11 months ago
version 5
eb48a934
11 months ago
version 4
ecb2ff0f
11 months ago
version 3
ecb2ff0f
11 months ago
version 2
d4230faa
11 months ago
version 1
84bd1fab
11 months ago
main (base)
and
version 9
latest version
a36bd71e
14 commits,
11 months ago
version 12
a36bd71e
28 commits,
11 months ago
version 11
ac4beafa
22 commits,
11 months ago
version 10
ac4beafa
27 commits,
11 months ago
version 9
9448460d
26 commits,
11 months ago
version 8
6220a9dd
20 commits,
11 months ago
version 7
5f66fef1
18 commits,
11 months ago
version 6
5f66fef1
28 commits,
11 months ago
version 5
eb48a934
27 commits,
11 months ago
version 4
ecb2ff0f
25 commits,
11 months ago
version 3
ecb2ff0f
27 commits,
11 months ago
version 2
d4230faa
7 commits,
11 months ago
version 1
84bd1fab
5 commits,
11 months ago
Show latest version
2 files
+
16
−
13
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
src/Controller/HomeController.php
+
5
−
13
Options
@@ -8,6 +8,7 @@ use App\Requests\{
SearchRequest
,
UniqElementsRequest
,
MenuRequest
,
HowDaysToNyRequest
,
CountFriday13Request
};
use
DateTimeImmutable
;
@@ -49,21 +50,12 @@ class HomeController extends AbstractController
return
$this
->
json
(
$result
);
}
#
[
Route
(
'/howDaysToNy/{day}/{month}/{year}'
,
name
:
'howDaysToNy'
,
requirements
:
[
'day'
=>
'(?<!-)(?<!\d)\d+'
,
'month'
=>
'(?<!-)(?<!\d)\d+'
,
'year'
=>
'(?<!-)(?<!\d)\d+'
],
methods
:
[
'GET'
]
)]
public
function
howDaysToNy
(
int
$day
,
int
$month
,
int
$year
):
Response
#[Route('/howDaysToNy', name: 'howDaysToNy', methods: ['GET'])]
public
function
howDaysToNy
(
HowDaysToNyRequest
$request
):
Response
{
$date
AsString
=
$year
.
"-"
.
$month
.
"-"
.
$day
;
$date
=
$request
->
getRequest
()
->
get
(
'date'
)
;
try
{
$result
=
$this
->
functions
->
howDaysToNy
(
new
DateTimeImmutable
(
$date
AsString
));
$result
=
$this
->
functions
->
howDaysToNy
(
new
DateTimeImmutable
(
$date
));
}
catch
(
\Exception
$e
)
{
return
new
Response
(
$e
->
getMessage
());
}
Loading