From: Pradeep Nayak Date: Wed, 3 Sep 2014 20:44:42 +0000 (+0530) Subject: --CRM-15055, fixed date formatting issue in message template for line-item X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=3b85fc04e9718240605f6bd1a54a5ff08a9a379e;p=civicrm-core.git --CRM-15055, fixed date formatting issue in message template for line-item --- diff --git a/CRM/Member/BAO/Membership.php b/CRM/Member/BAO/Membership.php index b0833e8e94..030b04de67 100644 --- a/CRM/Member/BAO/Membership.php +++ b/CRM/Member/BAO/Membership.php @@ -1327,8 +1327,8 @@ AND civicrm_membership.is_test = %2"; isset($createdMemberships[$priceFieldOp['membership_type_id']]) ) { $membershipOb = $createdMemberships[$priceFieldOp['membership_type_id']]; - $priceFieldOp['start_date'] = $membershipOb->start_date ? CRM_Utils_Date::customFormat($membershipOb->start_date, '%d%f %b, %Y') : '-'; - $priceFieldOp['end_date'] = $membershipOb->end_date ? CRM_Utils_Date::customFormat($membershipOb->end_date, '%d%f %b, %Y') : '-'; + $priceFieldOp['start_date'] = $membershipOb->start_date ? CRM_Utils_Date::customFormat($membershipOb->start_date, '%B %E%f, %Y') : '-'; + $priceFieldOp['end_date'] = $membershipOb->end_date ? CRM_Utils_Date::customFormat($membershipOb->end_date, '%B %E%f, %Y') : '-'; } else { $priceFieldOp['start_date'] = $priceFieldOp['end_date'] = 'N/A'; diff --git a/CRM/Member/Form/Membership.php b/CRM/Member/Form/Membership.php index bf182330c9..cfc3ee010f 100644 --- a/CRM/Member/Form/Membership.php +++ b/CRM/Member/Form/Membership.php @@ -1639,10 +1639,8 @@ WHERE id IN ( ' . implode(' , ', array_keys($membershipType)) . ' )'; if (!empty($lineItem[$priceSetId])) { foreach ($lineItem[$priceSetId] as & $priceFieldOp) { if (!empty($priceFieldOp['membership_type_id'])) { - $priceFieldOp['start_date'] = $membershipTypeValues[$priceFieldOp['membership_type_id']]['start_date'] ? CRM_Utils_Date::customFormat($membershipTypeValues[$priceFieldOp['membership_type_id']]['start_date'], '%d%f %b, %Y') : '-'; - - - $priceFieldOp['end_date'] = $membershipTypeValues[$priceFieldOp['membership_type_id']]['end_date'] ? CRM_Utils_Date::customFormat($membershipTypeValues[$priceFieldOp['membership_type_id']]['end_date'], '%d%f %b, %Y') : '-'; + $priceFieldOp['start_date'] = $membershipTypeValues[$priceFieldOp['membership_type_id']]['start_date'] ? CRM_Utils_Date::customFormat($membershipTypeValues[$priceFieldOp['membership_type_id']]['start_date'], '%B %E%f, %Y') : '-'; + $priceFieldOp['end_date'] = $membershipTypeValues[$priceFieldOp['membership_type_id']]['end_date'] ? CRM_Utils_Date::customFormat($membershipTypeValues[$priceFieldOp['membership_type_id']]['end_date'], '%B %E%f, %Y') : '-'; } else { $priceFieldOp['start_date'] = $priceFieldOp['end_date'] = 'N/A';