public static DateHelper::weekDaysAbbr($required = FALSE)
Constructs a translated array of week day abbreviations.
bool $required: (optional) If FALSE, the returned array will include a blank value. Defaults to FALSE.
array An array of week day abbreviations
public static function weekDaysAbbr($required = FALSE) { $weekdays = array( t('Sun', array(), array('context' => 'Abbreviated weekday')), t('Mon', array(), array('context' => 'Abbreviated weekday')), t('Tue', array(), array('context' => 'Abbreviated weekday')), t('Wed', array(), array('context' => 'Abbreviated weekday')), t('Thu', array(), array('context' => 'Abbreviated weekday')), t('Fri', array(), array('context' => 'Abbreviated weekday')), t('Sat', array(), array('context' => 'Abbreviated weekday')), ); $none = array('' => ''); return !$required ? $none + $weekdays : $weekdays; }
© 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::weekDaysAbbr/8.1.x