Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
boco-frontend
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
idatt2106_2022_02
boco-frontend
Commits
95c2783d
Commit
95c2783d
authored
3 years ago
by
Titus Netland
Browse files
Options
Downloads
Plain Diff
Merge branch 'chatTimeFix' into 'main'
Fixed hh:mm with numbers under 10 See merge request
!140
parents
c9fb7a01
f2a63b31
Branches
Branches containing commit
No related tags found
1 merge request
!140
Fixed hh:mm with numbers under 10
Pipeline
#181858
failed
3 years ago
Stage: test
Stage: deploy
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/ChatComponents/ChatMessage.vue
+9
-3
9 additions, 3 deletions
src/components/ChatComponents/ChatMessage.vue
src/components/UserProfileComponents/RentHistoryComponents/RentHistoryItem.vue
+4
-1
4 additions, 1 deletion
...ofileComponents/RentHistoryComponents/RentHistoryItem.vue
with
13 additions
and
4 deletions
src/components/ChatComponents/ChatMessage.vue
+
9
−
3
View file @
95c2783d
...
...
@@ -58,12 +58,18 @@ export default {
calculateTime
()
{
var
time
=
this
?.
message
.
timestamp
;
var
date
=
new
Date
(
time
);
//Todo add timing for mm and hh and week of message
var
mmOfMessage
=
String
(
date
.
getMinutes
());
var
hhOfMessage
=
String
(
date
.
getHours
());
if
(
mmOfMessage
<=
9
){
mmOfMessage
=
"
0
"
+
mmOfMessage
;
}
if
(
hhOfMessage
<=
9
){
hhOfMessage
=
"
0
"
+
hhOfMessage
;
}
var
ddOfMessage
=
String
(
date
.
getDate
()).
padStart
(
2
,
"
0
"
);
var
dayOfMessage
=
date
.
toLocaleString
(
"
default
"
,
{
weekday
:
"
short
"
});
var
monthOfMessage
=
String
(
date
.
getMonth
()
+
1
).
padStart
(
2
,
"
0
"
);
//January is 0!
var
monthOfMessage
=
String
(
date
.
getMonth
()
+
1
).
padStart
(
2
,
"
0
"
);
const
shortMonthOfMessage
=
date
.
toLocaleString
(
"
default
"
,
{
month
:
"
short
"
,
});
...
...
@@ -71,7 +77,7 @@ export default {
var
today
=
new
Date
();
var
dd
=
String
(
today
.
getDate
()).
padStart
(
2
,
"
0
"
);
var
mm
=
String
(
today
.
getMonth
()
+
1
).
padStart
(
2
,
"
0
"
);
//January is 0!
var
mm
=
String
(
today
.
getMonth
()
+
1
).
padStart
(
2
,
"
0
"
);
var
yyyy
=
today
.
getFullYear
();
if
(
ddOfMessage
==
dd
)
{
return
""
+
hhOfMessage
+
"
:
"
+
mmOfMessage
+
""
;
...
...
This diff is collapsed.
Click to expand it.
src/components/UserProfileComponents/RentHistoryComponents/RentHistoryItem.vue
+
4
−
1
View file @
95c2783d
...
...
@@ -97,7 +97,10 @@ export default {
getDateString
(
milliseconds
)
{
let
today
=
new
Date
();
let
date
=
new
Date
(
milliseconds
);
let
dateString
=
date
.
getDate
()
+
"
.
"
+
(
date
.
getMonth
()
+
1
);
const
shortMonthOfRentHistoryItem
=
date
.
toLocaleString
(
"
default
"
,
{
month
:
"
short
"
,
});
let
dateString
=
date
.
getDate
()
+
"
.
"
+
shortMonthOfRentHistoryItem
;
if
(
date
.
getFullYear
()
!=
today
.
getFullYear
())
{
dateString
+=
"
.
"
+
date
.
getFullYear
();
...
...
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