summaryrefslogtreecommitdiffstats
path: root/webapp
diff options
context:
space:
mode:
authorBjörn Roland <bjoernr-de@users.noreply.github.com>2017-02-11 01:58:38 +0300
committerJoram Wilander <jwawilander@gmail.com>2017-02-10 17:58:38 -0500
commit37222ec1b3364e1bd57ce268416edd1832be368c (patch)
treef17b608ef8c636efebaf704d35ec1bbc9efb7440 /webapp
parente47918e8cabe0bd6a391b043f494633b6317e241 (diff)
downloadchat-37222ec1b3364e1bd57ce268416edd1832be368c.tar.gz
chat-37222ec1b3364e1bd57ce268416edd1832be368c.tar.bz2
chat-37222ec1b3364e1bd57ce268416edd1832be368c.zip
Revert "#5108 Use <time> element for channel headers and search result headers" (#5359)
Diffstat (limited to 'webapp')
-rw-r--r--webapp/components/post_view/components/post_list.jsx18
-rw-r--r--webapp/components/search_results_item.jsx15
2 files changed, 14 insertions, 19 deletions
diff --git a/webapp/components/post_view/components/post_list.jsx b/webapp/components/post_view/components/post_list.jsx
index 5ff95477b..3584e9923 100644
--- a/webapp/components/post_view/components/post_list.jsx
+++ b/webapp/components/post_view/components/post_list.jsx
@@ -354,7 +354,7 @@ export default class PostList extends React.Component {
/>
);
- const currentPostDay = new Date(Utils.getDateForUnixTicks(post.create_at).setUTCHours(0, 0, 0, 0));
+ const currentPostDay = Utils.getDateForUnixTicks(post.create_at);
if (currentPostDay.toDateString() !== previousPostDay.toDateString()) {
postCtls.push(
<div
@@ -363,15 +363,13 @@ export default class PostList extends React.Component {
>
<hr className='separator__hr'/>
<div className='separator__text'>
- <time dateTime={currentPostDay.toISOString()}>
- <FormattedDate
- value={currentPostDay}
- weekday='short'
- month='short'
- day='2-digit'
- year='numeric'
- />
- </time>
+ <FormattedDate
+ value={currentPostDay}
+ weekday='short'
+ month='short'
+ day='2-digit'
+ year='numeric'
+ />
</div>
</div>
);
diff --git a/webapp/components/search_results_item.jsx b/webapp/components/search_results_item.jsx
index f2bca109a..8f885e967 100644
--- a/webapp/components/search_results_item.jsx
+++ b/webapp/components/search_results_item.jsx
@@ -286,20 +286,17 @@ export default class SearchResultsItem extends React.Component {
);
}
- const postCreateDate = new Date(Utils.getDateForUnixTicks(post.create_at).setUTCHours(0, 0, 0, 0));
return (
<div className='search-item__container'>
<div className='date-separator'>
<hr className='separator__hr'/>
<div className='separator__text'>
- <time dateTime={postCreateDate.toISOString()}>
- <FormattedDate
- value={postCreateDate}
- day='numeric'
- month='long'
- year='numeric'
- />
- </time>
+ <FormattedDate
+ value={post.create_at}
+ day='numeric'
+ month='long'
+ year='numeric'
+ />
</div>
</div>
<div