public static DateHelper::weekDaysAbbr2($required = FALSE)
Constructs a translated array of 2-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 2 letter abbreviations
File
- core/lib/Drupal/Core/Datetime/DateHelper.php, line 209
Class
- DateHelper
- Defines Gregorian Calendar date values.
Namespace
Drupal\Core\Datetime
Code
1 2 3 4 5 6 7 8 9 10 11 12 13 | public static function weekDaysAbbr2( $required = FALSE) { $weekdays = array ( t( 'Su' , array (), array ( 'context' => 'Abbreviated weekday' )), t( 'Mo' , array (), array ( 'context' => 'Abbreviated weekday' )), t( 'Tu' , array (), array ( 'context' => 'Abbreviated weekday' )), t( 'We' , array (), array ( 'context' => 'Abbreviated weekday' )), t( 'Th' , array (), array ( 'context' => 'Abbreviated weekday' )), t( 'Fr' , array (), array ( 'context' => 'Abbreviated weekday' )), t( 'Sa' , array (), array ( 'context' => 'Abbreviated weekday' )), ); $none = array ( '' => '' ); return ! $required ? $none + $weekdays : $weekdays ; } |
Please login to continue.