Mwalker has uploaded a new change for review.
https://gerrit.wikimedia.org/r/72554
Change subject: (FR #981) Timestamp becomes Datestamp in TY Emails
......................................................................
(FR #981) Timestamp becomes Datestamp in TY Emails
Just present the time/date as a date in thankyou emails because
the timestamp was just confusing.
Change-Id: Iebae6ff04884e5ed832c2c02e883229a9bc24a14
---
M sites/all/modules/thank_you/thank_you.module
1 file changed, 8 insertions(+), 6 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm
refs/changes/54/72554/1
diff --git a/sites/all/modules/thank_you/thank_you.module
b/sites/all/modules/thank_you/thank_you.module
index 498954e..a2e59ad 100644
--- a/sites/all/modules/thank_you/thank_you.module
+++ b/sites/all/modules/thank_you/thank_you.module
@@ -684,14 +684,16 @@
"uselang" => $language,
);
- // for donations made in the US on Jan 1 UTC, do not send the TY email
in UTC,
- // use HST for tax reasons
- if( $country == "US" ){
- if( strftime("%m-%d", strtotime( $contribution['receive_date']
) == "01-01" ) ){
- $contribution['receive_date'] = strftime("%Y-%m-%d
%H:%M:%S", strtotime( $contribution['receive_date'] ) - ( 60 * 60 * 10 ) );
- }
+ // Format the datestamp
+ $date = strtotime( $contribution['receive_date'] );
+ if ( $country === 'US' && strftime( "%m-%d" ) === '01-01' ) {
+ // For tax reasons, any donation made in the US on Jan 1 UTC
should have a timestring in HST
+ $contribution['receive_date'] = strftime("%Y-%m-%d", $date - (
60 * 60 * 10 ) );
+ } else {
+ $contribution['receive_date'] = strftime("%Y-%m-%d" );
}
+ // Render it! :)
$rendered = $template->render( array(
"contact" => $contact,
"contribution" => $contribution,
--
To view, visit https://gerrit.wikimedia.org/r/72554
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iebae6ff04884e5ed832c2c02e883229a9bc24a14
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Mwalker <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits