Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-3338541
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
drupal-3338541
Commits
ac51ec96
Commit
ac51ec96
authored
10 years ago
by
Alex Pott
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#2269165
by aloyr: Fixed Short month names lack context, other contexts overly specific.
parent
7b8d4375
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/modules/datetime/src/DateHelper.php
+33
-33
33 additions, 33 deletions
core/modules/datetime/src/DateHelper.php
with
33 additions
and
33 deletions
core/modules/datetime/src/DateHelper.php
+
33
−
33
View file @
ac51ec96
...
...
@@ -118,18 +118,18 @@ public static function monthNamesAbbr($required = FALSE) {
// Force the key to use the correct month value, rather than
// starting with zero.
$monthnames
=
array
(
1
=>
t
(
'Jan'
),
2
=>
t
(
'Feb'
),
3
=>
t
(
'Mar'
),
4
=>
t
(
'Apr'
),
5
=>
t
(
'May'
),
6
=>
t
(
'Jun'
),
7
=>
t
(
'Jul'
),
8
=>
t
(
'Aug'
),
9
=>
t
(
'Sep'
),
10
=>
t
(
'Oct'
),
11
=>
t
(
'Nov'
),
12
=>
t
(
'Dec'
),
1
=>
t
(
'Jan'
,
array
(),
array
(
'context'
=>
'Abbreviated month name'
)
),
2
=>
t
(
'Feb'
,
array
(),
array
(
'context'
=>
'Abbreviated month name'
)
),
3
=>
t
(
'Mar'
,
array
(),
array
(
'context'
=>
'Abbreviated month name'
)
),
4
=>
t
(
'Apr'
,
array
(),
array
(
'context'
=>
'Abbreviated month name'
)
),
5
=>
t
(
'May'
,
array
(),
array
(
'context'
=>
'Abbreviated month name'
)
),
6
=>
t
(
'Jun'
,
array
(),
array
(
'context'
=>
'Abbreviated month name'
)
),
7
=>
t
(
'Jul'
,
array
(),
array
(
'context'
=>
'Abbreviated month name'
)
),
8
=>
t
(
'Aug'
,
array
(),
array
(
'context'
=>
'Abbreviated month name'
)
),
9
=>
t
(
'Sep'
,
array
(),
array
(
'context'
=>
'Abbreviated month name'
)
),
10
=>
t
(
'Oct'
,
array
(),
array
(
'context'
=>
'Abbreviated month name'
)
),
11
=>
t
(
'Nov'
,
array
(),
array
(
'context'
=>
'Abbreviated month name'
)
),
12
=>
t
(
'Dec'
,
array
(),
array
(
'context'
=>
'Abbreviated month name'
)
),
);
$none
=
array
(
''
=>
''
);
return
!
$required
?
$none
+
$monthnames
:
$monthnames
;
...
...
@@ -189,13 +189,13 @@ public static function weekDays($required = FALSE) {
*/
public
static
function
weekDaysAbbr
(
$required
=
FALSE
)
{
$weekdays
=
array
(
t
(
'Sun'
,
array
(),
array
(
'context'
=>
'
Sunday abbreviation
'
)),
t
(
'Mon'
,
array
(),
array
(
'context'
=>
'
Monday abbreviation
'
)),
t
(
'Tue'
,
array
(),
array
(
'context'
=>
'
Tuesday abbreviation
'
)),
t
(
'Wed'
,
array
(),
array
(
'context'
=>
'
Wednesday abbreviation
'
)),
t
(
'Thu'
,
array
(),
array
(
'context'
=>
'
Thursday abbreviation
'
)),
t
(
'Fri'
,
array
(),
array
(
'context'
=>
'
Friday abbreviation
'
)),
t
(
'Sat'
,
array
(),
array
(
'context'
=>
'
Saturday abbreviation
'
)),
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
;
...
...
@@ -213,13 +213,13 @@ public static function weekDaysAbbr($required = FALSE) {
*/
public
static
function
weekDaysAbbr2
(
$required
=
FALSE
)
{
$weekdays
=
array
(
t
(
'Su'
,
array
(),
array
(
'context'
=>
'
Sunday 2 letter abbreviation
'
)),
t
(
'Mo'
,
array
(),
array
(
'context'
=>
'
Monday 2 letter abbreviation
'
)),
t
(
'Tu'
,
array
(),
array
(
'context'
=>
'
Tuesday 2 letter abbreviation
'
)),
t
(
'We'
,
array
(),
array
(
'context'
=>
'
Wednesday 2 letter abbreviation
'
)),
t
(
'Th'
,
array
(),
array
(
'context'
=>
'
Thursday 2 letter abbreviation
'
)),
t
(
'Fr'
,
array
(),
array
(
'context'
=>
'
Friday 2 letter abbreviation
'
)),
t
(
'Sa'
,
array
(),
array
(
'context'
=>
'
Saturday 2 letter abbreviation
'
)),
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
;
...
...
@@ -237,13 +237,13 @@ public static function weekDaysAbbr2($required = FALSE) {
*/
public
static
function
weekDaysAbbr1
(
$required
=
FALSE
)
{
$weekdays
=
array
(
t
(
'S'
,
array
(),
array
(
'context'
=>
'
Sunday 1 letter abbreviation
'
)),
t
(
'M'
,
array
(),
array
(
'context'
=>
'
Monday 1 letter abbreviation
'
)),
t
(
'T'
,
array
(),
array
(
'context'
=>
'
Tuesday 1 letter abbreviation
'
)),
t
(
'W'
,
array
(),
array
(
'context'
=>
'
Wednesday 1 letter abbreviation
'
)),
t
(
'T'
,
array
(),
array
(
'context'
=>
'
Thursday 1 letter abbreviation
'
)),
t
(
'F'
,
array
(),
array
(
'context'
=>
'
Friday 1 letter abbreviation
'
)),
t
(
'S'
,
array
(),
array
(
'context'
=>
'
Saturday 1 letter abbreviation
'
)),
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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment