public static DateHelper::weekDays($required = FALSE)
Returns a translated array of week names.
bool $required: (optional) If FALSE, the returned array will include a blank value. Defaults to FALSE.
array An array of week day names
public static function weekDays($required = FALSE) { $weekdays = array( t('Sunday'), t('Monday'), t('Tuesday'), t('Wednesday'), t('Thursday'), t('Friday'), t('Saturday'), ); $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::weekDays/8.1.x