Skip to content

Commit d76745b

Browse files
authored
Deprecate Date_Short and removed strftime (OpenMage#4462)
Deprecate Class because the values are strftime format strings removed strftime and replace with date calls
1 parent cbd47bc commit d76745b

File tree

1 file changed

+5
-4
lines changed
  • app/code/core/Mage/Adminhtml/Model/System/Config/Source/Date

1 file changed

+5
-4
lines changed

app/code/core/Mage/Adminhtml/Model/System/Config/Source/Date/Short.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,18 @@
1717
/**
1818
* @category Mage
1919
* @package Mage_Adminhtml
20+
* @deprecated
2021
*/
2122
class Mage_Adminhtml_Model_System_Config_Source_Date_Short
2223
{
2324
public function toOptionArray()
2425
{
2526
$arr = [];
2627
$arr[] = ['label' => '', 'value' => ''];
27-
$arr[] = ['label' => strftime('MM/DD/YY (%m/%d/%y)'), 'value' => '%m/%d/%y'];
28-
$arr[] = ['label' => strftime('MM/DD/YYYY (%m/%d/%Y)'), 'value' => '%m/%d/%Y'];
29-
$arr[] = ['label' => strftime('DD/MM/YY (%d/%m/%y)'), 'value' => '%d/%m/%y'];
30-
$arr[] = ['label' => strftime('DD/MM/YYYY (%d/%m/%Y)'), 'value' => '%d/%m/%Y'];
28+
$arr[] = ['label' => sprintf('MM/DD/YY (%s)', date('m/d/y')), 'value' => '%m/%d/%y'];
29+
$arr[] = ['label' => sprintf('MM/DD/YYYY (%s)', date('m/d/Y')), 'value' => '%m/%d/%Y'];
30+
$arr[] = ['label' => sprintf('DD/MM/YY (%s)', date('d/m/y')), 'value' => '%d/%m/%y'];
31+
$arr[] = ['label' => sprintf('DD/MM/YYYY (%s)', date('d/m/Y')), 'value' => '%d/%m/%Y'];
3132
return $arr;
3233
}
3334
}

0 commit comments

Comments
 (0)