public static function DateHelper::weekDaysAbbr1 in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Datetime/DateHelper.php \Drupal\Core\Datetime\DateHelper::weekDaysAbbr1()
Constructs a translated array of 1-letter week day abbreviations.
Parameters
bool $required: (optional) If FALSE, the returned array will include a blank value. Defaults to FALSE.
Return value
array An array of week day 1 letter abbreviations
File
- core/
lib/ Drupal/ Core/ Datetime/ DateHelper.php, line 236 - Contains \Drupal\Core\Datetime\DateHelper.
Class
- DateHelper
- Defines Gregorian Calendar date values.
Namespace
Drupal\Core\DatetimeCode
public static function weekDaysAbbr1($required = FALSE) {
$weekdays = array(
t('S', array(), array(
'context' => 'Abbreviated 1 letter weekday Sunday',
)),
t('M', array(), array(
'context' => 'Abbreviated 1 letter weekday Monday',
)),
t('T', array(), array(
'context' => 'Abbreviated 1 letter weekday Tuesday',
)),
t('W', array(), array(
'context' => 'Abbreviated 1 letter weekday Wednesday',
)),
t('T', array(), array(
'context' => 'Abbreviated 1 letter weekday Thursday',
)),
t('F', array(), array(
'context' => 'Abbreviated 1 letter weekday Friday',
)),
t('S', array(), array(
'context' => 'Abbreviated 1 letter weekday Saturday',
)),
);
$none = array(
'' => '',
);
return !$required ? $none + $weekdays : $weekdays;
}