Input date format is now a config parameter instead of the current locale
This commit is contained in:
@@ -57,7 +57,7 @@ class DateParser extends Base
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the list of supported date formats
|
||||
* Return the list of supported date formats (for the parser)
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
@@ -65,12 +65,27 @@ class DateParser extends Base
|
||||
public function getDateFormats()
|
||||
{
|
||||
return array(
|
||||
t('m/d/Y'),
|
||||
$this->config->get('application_date_format', 'm/d/Y'),
|
||||
'Y-m-d',
|
||||
'Y_m_d',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the list of available date formats (for the config page)
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getAvailableFormats()
|
||||
{
|
||||
return array(
|
||||
'm/d/Y' => date('m/d/Y'),
|
||||
'd/m/Y' => date('d/m/Y'),
|
||||
'Y/m/d' => date('Y/m/d'),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* For a given timestamp, reset the date to midnight
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user