public static DateHelper::ampm($required = FALSE)
Constructs an array of AM and PM options.
bool $required: (optional) If FALSE, the returned array will include a blank value. Defaults to FALSE.
array An array of AM and PM options.
public static function ampm($required = FALSE) { $none = array('' => ''); $ampm = array( 'am' => t('am', array(), array('context' => 'ampm')), 'pm' => t('pm', array(), array('context' => 'ampm')), ); return !$required ? $none + $ampm : $ampm; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Datetime!DateHelper.php/function/DateHelper::ampm/8.1.x