Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
uw_cfg_common
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor 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
WCMS
uw_cfg_common
Commits
2728ab76
Commit
2728ab76
authored
3 years ago
by
Eric Bremner
Committed by
Eric Bremner
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
ISTWCMS-4704: pulling back filtering out dates until we figure out how to do this in the view
parent
9f86b54d
No related branches found
No related tags found
1 merge request
!112
Feature/istwcms 4704 m26lebla ebremner content types
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Service/UWService.php
+18
-16
18 additions, 16 deletions
src/Service/UWService.php
with
18 additions
and
16 deletions
src/Service/UWService.php
+
18
−
16
View file @
2728ab76
...
@@ -427,24 +427,26 @@ class UWService implements UWServiceInterface {
...
@@ -427,24 +427,26 @@ class UWService implements UWServiceInterface {
else
{
else
{
// If the date is upcoming, meaning greater than right now.
// If the date is upcoming, meaning greater than right now.
if
(
$date
[
'end_value'
]
>
strtotime
(
"today"
))
{
// Taking this out for now, will be putting it back, if
// we figure out how to do this in the view.
// If this is the same day, get the date and the start
// if ($date['end_value'] > strtotime("today")) {
// and end times.
if
(
$date
[
'duration'
]
<
'1439'
)
{
// If this is the same day, get the date and the start
$start_date
=
date
(
'l, F j, Y g:i A'
,
$date
[
'value'
]);
// and end times.
$end_date
=
date
(
'g:i A'
,
$date
[
'end_value'
]);
if
(
$date
[
'duration'
]
<
'1439'
)
{
}
$start_date
=
date
(
'l, F j, Y g:i A'
,
$date
[
'value'
]);
$end_date
=
date
(
'g:i A'
,
$date
[
'end_value'
]);
// This is not the day, get the start and end date with time.
}
else
{
$start_date
=
date
(
'l, F j, Y g:i A'
,
$date
[
'value'
]);
$end_date
=
date
(
'l, F j, Y g:i A'
,
$date
[
'end_value'
]);
}
// Add the start and end date with timezone.
// This is not the day, get the start and end date with time.
$return_dates
[]
=
$start_date
.
' - '
.
$end_date
.
' '
.
date
(
'T'
,
$date
[
'end_value'
]);
else
{
$start_date
=
date
(
'l, F j, Y g:i A'
,
$date
[
'value'
]);
$end_date
=
date
(
'l, F j, Y g:i A'
,
$date
[
'end_value'
]);
}
}
// Add the start and end date with timezone.
$return_dates
[]
=
$start_date
.
' - '
.
$end_date
.
' '
.
date
(
'T'
,
$date
[
'end_value'
]);
// }
}
}
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment