Skip to content

Commit

Permalink
Merge pull request #13 from waytohealth/HF-7173
Browse files Browse the repository at this point in the history
[WTH-7173]
  • Loading branch information
mcgrogan91 authored Sep 17, 2024
2 parents 88eabdb + dbefc9c commit 064feda
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/MessageView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</div>
<div v-for="(msgs, date) in messagesByDate" :key="date">
<div class="date">
{{ inboxHelper.formatDate(date) }}
{{ inboxHelper.formatDate(date, false) }}
</div>

<div v-for="msg in msgs" :key="msg.id">
Expand Down
8 changes: 6 additions & 2 deletions src/helpers/inbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,12 @@ let helper = {
let datetime = msg.sent_at || msg.created_at;
return dayjs(datetime).tz(this.tz).format('dddd, D MMMM YYYY – h:mm:ss A');
},
formatDate: function(date) {
return dayjs(date).tz(this.tz).format('~ dddd, D MMMM YYYY ~');
formatDate: function(date, applyTz = true) {
if (applyTz) {
return dayjs(date).tz(this.tz).format('~ dddd, D MMMM YYYY ~');
}

return dayjs(date).format('~ dddd, D MMMM YYYY ~');
},
formatNumber: function(number) {
// +12345678901 -> 234-567-8901
Expand Down

0 comments on commit 064feda

Please sign in to comment.