'dateformatPartial' => CRM_Core_BAO_Setting::LOCALIZATION_PREFERENCES_NAME,
'dateformatYear' => CRM_Core_BAO_Setting::LOCALIZATION_PREFERENCES_NAME,
'dateformatTime' => CRM_Core_BAO_Setting::LOCALIZATION_PREFERENCES_NAME,
+ 'dateformatFinancialBatch' => CRM_Core_BAO_Setting::LOCALIZATION_PREFERENCES_NAME,
'weekBegins' => CRM_Core_BAO_Setting::LOCALIZATION_PREFERENCES_NAME,
'dateInputFormat' => CRM_Core_BAO_Setting::LOCALIZATION_PREFERENCES_NAME,
'timeInputFormat' => CRM_Core_BAO_Setting::LOCALIZATION_PREFERENCES_NAME,
'dateformatPartial' => array('setting'),
'dateformatTime' => array('setting'),
'dateformatYear' => array('setting'),
+ 'dateformatFinancialBatch' => array('setting'),
'debug' => array('setting', 'debug_enabled'), // renamed.
'defaultContactCountry' => array('setting'),
'defaultContactStateProvince' => array('setting'),
$s1 = str_replace(self::$SEPARATOR, '\t', $s);
switch ($type) {
case 'date':
- $sout = date('Y/m/d', strtotime($s1));
+ $dateFormat = Civi::settings()->get('dateformatFinancialBatch');
+ $sout = CRM_Utils_Date::customFormat($s1, $dateFormat);
break;
case 'money':
'title' => 'Date Format: Year Only',
'description' => '',
),
+ 'dateformatFinancialBatch' => array(
+ 'add' => '4.7',
+ 'help_text' => NULL,
+ 'is_domain' => 1,
+ 'is_contact' => 0,
+ 'group_name' => 'Localization Preferences',
+ 'group' => 'localization',
+ 'name' => 'dateformatFinancialBatch',
+ 'type' => 'String',
+ 'quick_form_type' => 'Element',
+ 'html_type' => 'text',
+ 'html_attributes' => array(
+ 'size' => '12',
+ 'maxlength' => '60',
+ ),
+ 'default' => '%m/%d/%Y',
+ 'title' => 'Date Format: Financial Batch',
+ 'description' => '',
+ ),
'dateInputFormat' => array(
'add' => '4.7',
'help_text' => NULL,
<td class="label">{$form.dateformatTime.label}</td>
<td>{$form.dateformatTime.html}</td>
</tr>
+ <tr class="crm-date-form-block-dateformatTime">
+ <td class="label">{$form.dateformatFinancialBatch.label}</td>
+ <td>{$form.dateformatFinancialBatch.html}</td>
+ </tr>
</table>
</fieldset>
<fieldset><legend>{ts}Date Input Fields{/ts}</legend>