'#description'=>t('A unique machine-readable name. Can only contain lowercase letters, numbers, and underscores.'),
'#default_value'=>'',
'#machine_name'=>array(
'exists'=>'system_date_format_exists',
'source'=>array('date_format_name'),
),
);
if(class_exists('intlDateFormatter')){
$description=t('A user-defined date format. See the <a href="@url">PHP manual</a> for available options.',array('@url'=>'http://userguide.icu-project.org/formatparse/datetime'));
}
else{
$description=t('A user-defined date format. See the <a href="@url">PHP manual</a> for available options.',array('@url'=>'http://php.net/manual/function.date.php'));
$now=t('Displayed as %date',array('%date'=>format_date(REQUEST_TIME,$date_format_id)));
$form['date_format_id']=array(
'#type'=>'machine_name',
'#title'=>t('Machine-readable name'),
'#description'=>t('A unique machine-readable name. Can only contain lowercase letters, numbers, and underscores.'),
'#disabled'=>!empty($date_format_id),
'#default_value'=>$date_format_id,
'#machine_name'=>array(
'exists'=>'system_date_format_exists',
'source'=>array('date_format_name'),
),
);
if(class_exists('intlDateFormatter')){
$description=t('A user-defined date format. See the <a href="@url">PHP manual</a> for available options.',array('@url'=>'http://userguide.icu-project.org/formatparse/datetime'));
}
else{
$description=t('A user-defined date format. See the <a href="@url">PHP manual</a> for available options.',array('@url'=>'http://php.net/manual/function.date.php'));
$now=!empty($date_format_id)?t('Displayed as %date',array('%date'=>format_date(REQUEST_TIME,$date_format_id))):'';
$form['date_format_id']=array(
'#type'=>'machine_name',
'#title'=>t('Machine-readable name'),
'#description'=>t('A unique machine-readable name. Can only contain lowercase letters, numbers, and underscores.'),
'#disabled'=>!empty($date_format_id),
'#default_value'=>$date_format_id,
'#machine_name'=>array(
'exists'=>'system_date_format_exists',
'source'=>array('date_format_name'),
),
);
if(class_exists('intlDateFormatter')){
$description=t('A user-defined date format. See the <a href="@url">PHP manual</a> for available options.',array('@url'=>'http://userguide.icu-project.org/formatparse/datetime'));
}
else{
$description=t('A user-defined date format. See the <a href="@url">PHP manual</a> for available options.',array('@url'=>'http://php.net/manual/function.date.php'));