Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add default tz param to date formatting #1227

Merged
merged 2 commits into from
Oct 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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