Skip to content

Commit

Permalink
Merge pull request #98 from foundersandcoders/format-event-view-date
Browse files Browse the repository at this point in the history
adds a helper function to format the date in the event details page
  • Loading branch information
des-des authored Jan 23, 2018
2 parents 7be335f + c703044 commit d80e4a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ app.engine(
getMapLink,
checkOptionsValue,
checkedDropDown,
formatDate: date => `${new Date(date).toUTCString()}`,
iterate,
getDate: date => date.split('T')[0],
getHours: date => new Date(date).getHours(),
Expand Down
4 changes: 2 additions & 2 deletions views/event.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@
</tr>
<tr class="">
<td class="tr light-text f4 b pa3">{{localText.eventStart}}:</td>
<td class="tl light-text f4">{{event.startTime}}</td>
<td class="tl light-text f4">{{formatDate event.startTime}}</td>
</tr>
<tr class="">
<td class="tr light-text f4 b pa3">{{localText.eventEnd}}:</td>
<td class="tl light-text f4">{{event.endTime}}</td>
<td class="tl light-text f4">{{formatDate event.endTime}}</td>
</tr>
<tr class="">
<td class="tr light-text f4 b pa3">{{localText.eventsCost}}:</td>
Expand Down

0 comments on commit d80e4a2

Please sign in to comment.