Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
e216f4c2
Commit
e216f4c2
authored
May 04, 2021
by
Kev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add release date validation
parent
4d5abf60
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
app/assets/javascripts/whats_new/components/feature.vue
app/assets/javascripts/whats_new/components/feature.vue
+6
-1
No files found.
app/assets/javascripts/whats_new/components/feature.vue
View file @
e216f4c2
<
script
>
import
{
GlBadge
,
GlIcon
,
GlLink
,
GlSafeHtmlDirective
,
GlButton
}
from
'
@gitlab/ui
'
;
import
{
dateInWords
}
from
'
~/lib/utils/datetime_utility
'
;
import
{
dateInWords
,
isValidDate
}
from
'
~/lib/utils/datetime_utility
'
;
export
default
{
components
:
{
...
...
@@ -22,6 +22,11 @@ export default {
releaseDate
()
{
const
{
published_at
}
=
this
.
feature
;
const
date
=
new
Date
(
published_at
);
if
(
!
isValidDate
(
date
)
||
date
.
getTime
()
===
0
)
{
return
''
;
}
return
dateInWords
(
date
);
},
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment