diff --git a/forms/DateField.php b/forms/DateField.php index 335deae33..63ff71f57 100755 --- a/forms/DateField.php +++ b/forms/DateField.php @@ -210,8 +210,11 @@ class DateField extends TextField { if(Validator::get_javascript_validator_handler() == 'none') return true; if($this->getConfig('dmyfields')) { - $error = _t('DateField.VALIDATIONJS', 'Please enter a valid date format (DD/MM/YYYY).'); - $error = 'Please enter a valid date format (DD/MM/YYYY) from dmy.'; + $error = _t('DateField.VALIDATIONJS', 'Please enter a valid date format.'); + // Remove hardcoded date formats from translated strings + $error = preg_replace('/\(.*\)/', '', $error); + $error .= ' (' . $this->getConfig('dateformat') .')'; + $jsFunc =<< 'en-GB', + 'en_US' => 'en-US', + 'en_NZ' => 'en-GB', 'fr_CH' => 'fr-CH', 'pt_BR' => 'pt-BR', 'sr_SR' => 'sr-SR', diff --git a/lang/en_US.php b/lang/en_US.php index 694e37ff4..72b427977 100644 --- a/lang/en_US.php +++ b/lang/en_US.php @@ -150,7 +150,7 @@ $lang['en_US']['Date']['YEAR'] = ' year'; $lang['en_US']['Date']['YEARS'] = ' years'; $lang['en_US']['DateField']['NOTSET'] = 'not set'; $lang['en_US']['DateField']['TODAY'] = 'today'; -$lang['en_US']['DateField']['VALIDATIONJS'] = 'Please enter a valid date format (DD/MM/YYYY).'; +$lang['en_US']['DateField']['VALIDATIONJS'] = 'Please enter a valid date format.'; $lang['en_US']['DateField']['VALIDDATEFORMAT2'] = 'Please enter a valid date format (%s).'; $lang['en_US']['DateField']['VALIDDATEMAXDATE'] = 'Your date has to be older or matching the maximum allowed date (%s)'; $lang['en_US']['DateField']['VALIDDATEMINDATE'] = 'Your date has to be newer or matching the minimum allowed date (%s)'; diff --git a/thirdparty/Zend/Locale/Data/en_US.xml b/thirdparty/Zend/Locale/Data/en_US.xml index eef47372d..e6fc80ddf 100644 --- a/thirdparty/Zend/Locale/Data/en_US.xml +++ b/thirdparty/Zend/Locale/Data/en_US.xml @@ -7,4 +7,68 @@ + + + + + + + EEEE, d MMMM yyyy + + + + + d MMMM yyyy + + + + + MM/dd/yyyy + + + + + MM/dd/yyyy + + + + + + + HH:mm:ss v + + + + + HH:mm:ss z + + + + + hh:mm a + + + + + hh:mm a + + + + + + + + true + + + true + + + true + + + true + + +