Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
moodle
moodle
Commits
09858c06
Commit
09858c06
authored
Jun 30, 2022
by
Andrew Nicols
Browse files
Merge branch 'MDL-74379_master' of
https://github.com/aya-saad1/moodle
parents
3b072f0b
8be0dfc9
Changes
2
Hide whitespace changes
Inline
Side-by-side
lang/en/langconfig.php
View file @
09858c06
...
...
@@ -23,6 +23,8 @@
*/
$string
[
'alphabet'
]
=
'A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z'
;
$string
[
'am'
]
=
'am'
;
$string
[
'amcaps'
]
=
'AM'
;
$string
[
'backupnameformat'
]
=
'%Y%m%d-%H%M'
;
$string
[
'dateintervaldayshoursmins'
]
=
'%ad %hh %im'
;
// See https://www.php.net/manual/en/dateinterval.format.php for format.
$string
[
'decsep'
]
=
'.'
;
...
...
@@ -37,6 +39,8 @@ $string['localewin'] = 'English_Australia.1252';
$string
[
'localewincharset'
]
=
''
;
$string
[
'oldcharset'
]
=
'ISO-8859-1'
;
$string
[
'parentlanguage'
]
=
''
;
$string
[
'pm'
]
=
'pm'
;
$string
[
'pmcaps'
]
=
'PM'
;
$string
[
'strftimedate'
]
=
'%d %B %Y'
;
$string
[
'strftimedatemonthabbr'
]
=
'%d %b %Y'
;
$string
[
'strftimedatefullshort'
]
=
'%d/%m/%y'
;
...
...
lib/moodlelib.php
View file @
09858c06
...
...
@@ -2356,6 +2356,21 @@ function date_format_string($date, $format, $tz = 99) {
}
date_default_timezone_set
(
core_date
::
get_user_timezone
(
$tz
));
$datearray
=
getdate
(
$date
);
if
(
nl_langinfo
(
AM_STR
)
==
nl_langinfo
(
PM_STR
))
{
$format
=
str_replace
([
'%P'
,
'%p'
,
],
[
$datearray
[
'hours'
]
<
12
?
get_string
(
'am'
,
'langconfig'
)
:
get_string
(
'pm'
,
'langconfig'
),
$datearray
[
'hours'
]
<
12
?
get_string
(
'amcaps'
,
'langconfig'
)
:
get_string
(
'pmcaps'
,
'langconfig'
),
],
$format
);
}
$datestring
=
strftime
(
$format
,
$date
);
core_date
::
set_default_server_timezone
();
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment