Skip to content

Commit

Permalink
Merge pull request #1227 from sharetribe/email-template-tz
Browse files Browse the repository at this point in the history
Add default tz param to date formatting
  • Loading branch information
lyyder committed Oct 28, 2019
2 parents 1df6557 + 4e61bd9 commit 3a65422
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 19 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ way to update this template, but currently, we follow a pattern:

## Upcoming version 2019-XX-XX

- [add] Add default timezone to date formatting in example transaction process
email templates.
[#1227](https://github.com/sharetribe/flex-template-web/pull/1227)
- [change] Update @formatjs/intl-relativetimeformat from 2.8.3 to 4.2.1
[#1222](https://github.com/sharetribe/flex-template-web/pull/1222)
- [fix] Use currency of the `lineItem` on every line of the `BookingBreakdown` if possible.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{{~/inline~}}

{{~#*inline "format-date"~}}
{{date date format="MMM d, YYYY"}}
{{date date format="MMM d, YYYY" tz="Etc/UTC"}}
{{~/inline~}}

<html>
Expand Down Expand Up @@ -48,12 +48,12 @@ <h1>Your booking request was accepted!</h1>
<td class="right">End date</td>
</tr>
<tr>
<th class="left">{{date booking.start format="EEEE"}}</th>
<th class="right">{{date booking.end format="EEEE"}}</th>
<th class="left">{{date booking.start format="EEEE" tz="Etc/UTC"}}</th>
<th class="right">{{date booking.end format="EEEE" tz="Etc/UTC"}}</th>
</tr>
<tr class="bottom-row">
<th class="left">{{date booking.start format="MMM d"}}</th>
<th class="right">{{date booking.end format="MMM d"}}</th>
<th class="left">{{date booking.start format="MMM d" tz="Etc/UTC"}}</th>
<th class="right">{{date booking.end format="MMM d" tz="Etc/UTC"}}</th>
</tr>
</thead>
{{#each tx-line-items}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

{{~#*inline "format-date"~}}
{{date date format="MMM d, YYYY"}}
{{date date format="MMM d, YYYY" tz="Etc/UTC"}}
{{~/inline~}}

<html>
Expand All @@ -17,4 +17,4 @@ <h1>Your booking request has expired.</h1>

<p>You have received this email notification because you are a member of {{marketplace.name}}. If you no longer wish to receive these emails, please contact {{marketplace.name}} team.</p>
</body>
</html>
</html>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

{{~#*inline "format-date"~}}
{{date date format="MMM d, YYYY"}}
{{date date format="MMM d, YYYY" tz="Etc/UTC"}}
{{~/inline~}}

<html>
Expand All @@ -17,4 +17,4 @@ <h1>Your booking request was declined.</h1>

<p>You have received this email notification because you are a member of {{marketplace.name}}. If you no longer wish to receive these emails, please contact {{marketplace.name}} team.</p>
</body>
</html>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{{~/inline~}}

{{~#*inline "format-date"~}}
{{date date format="MMM d, YYYY"}}
{{date date format="MMM d, YYYY" tz="Etc/UTC"}}
{{~/inline~}}

<html>
Expand Down Expand Up @@ -48,12 +48,12 @@ <h1>You have been paid {{> format-money money=payout-total}}</h1>
<td class="right">End date</td>
</tr>
<tr>
<th class="left">{{date booking.start format="EEEE"}}</th>
<th class="right">{{date booking.end format="EEEE"}}</th>
<th class="left">{{date booking.start format="EEEE" tz="Etc/UTC"}}</th>
<th class="right">{{date booking.end format="EEEE" tz="Etc/UTC"}}</th>
</tr>
<tr class="bottom-row">
<th class="left">{{date booking.start format="MMM d"}}</th>
<th class="right">{{date booking.end format="MMM d"}}</th>
<th class="left">{{date booking.start format="MMM d" tz="Etc/UTC"}}</th>
<th class="right">{{date booking.end format="MMM d" tz="Etc/UTC"}}</th>
</tr>
</thead>
<tbody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{{~/inline~}}

{{~#*inline "format-date"~}}
{{date date format="MMM d, YYYY"}}
{{date date format="MMM d, YYYY" tz="Etc/UTC"}}
{{~/inline~}}

<html>
Expand Down Expand Up @@ -45,12 +45,12 @@ <h1>Please respond to a request by {{customer.display-name}}</h1>
<td class="right">End date</td>
</tr>
<tr>
<th class="left">{{date booking.start format="EEEE"}}</th>
<th class="right">{{date booking.end format="EEEE"}}</th>
<th class="left">{{date booking.start format="EEEE" tz="Etc/UTC"}}</th>
<th class="right">{{date booking.end format="EEEE" tz="Etc/UTC"}}</th>
</tr>
<tr class="bottom-row">
<th class="left">{{date booking.start format="MMM d"}}</th>
<th class="right">{{date booking.end format="MMM d"}}</th>
<th class="left">{{date booking.start format="MMM d" tz="Etc/UTC"}}</th>
<th class="right">{{date booking.end format="MMM d" tz="Etc/UTC"}}</th>
</tr>
</thead>
<tbody>
Expand Down

0 comments on commit 3a65422

Please sign in to comment.