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
mahara
mahara
Commits
881231ef
Commit
881231ef
authored
Nov 08, 2006
by
Penny Leach
Browse files
added language strings to langconfig for date formats, added format_date
function
parent
ab0bd67b
Changes
2
Hide whitespace changes
Inline
Side-by-side
htdocs/lang/en.utf8/langconfig.php
View file @
881231ef
...
...
@@ -27,17 +27,17 @@
defined
(
'INTERNAL'
)
||
die
();
$string
[
'parentlanguage'
]
=
''
;
$string
[
'strftimedate'
]
=
''
;
$string
[
'strftimedateshort'
]
=
''
;
$string
[
'strftimedatetime'
]
=
''
;
$string
[
'strftimedaydate'
]
=
'
'
,
$string
[
'strftimedaydatetime'
]
=
''
;
$string
[
'strftimedayshort'
]
=
''
;
$string
[
'strftimedaytime'
]
=
''
;
$string
[
'strftimemonthyear'
]
=
''
;
$string
[
'strftimerecent'
]
=
''
;
$string
[
'strftimerecentfull'
]
=
''
;
$string
[
'strftimetime'
]
=
''
;
$string
[
'strftimedate'
]
=
'
%%d %%B %%Y
'
;
$string
[
'strftimedateshort'
]
=
'
%%d %%B
'
;
$string
[
'strftimedatetime'
]
=
'
%%d %%B %%Y, %%I:%%M %%p
'
;
$string
[
'strftimedaydate'
]
=
'
%%A, %%d %%B %%Y'
;
$string
[
'strftimedaydatetime'
]
=
'
%%A, %%d %%B %%Y, %%I:%%M %%p
'
;
$string
[
'strftimedayshort'
]
=
'
%%A, %%d %%B
'
;
$string
[
'strftimedaytime'
]
=
'
%%a, %%H:%%M
'
;
$string
[
'strftimemonthyear'
]
=
'
%%B %%Y
'
;
$string
[
'strftimerecent'
]
=
'
%%d %%b, %%H:%%M
'
;
$string
[
'strftimerecentfull'
]
=
'
%%a, %%d %%b %%Y, %%I:%%M %%p
'
;
$string
[
'strftimetime'
]
=
'
%%I:%%M %%p
'
;
$string
[
'thislanguage'
]
=
'English'
;
...
...
htdocs/lib/mahara.php
View file @
881231ef
...
...
@@ -891,4 +891,17 @@ function fullname($user) {
// @todo
}
/**
* formats a unix timestamp to a nice date format.
*
* @param int $date unix timestamp to format
* @param string $formatkey language key to fetch the format from
* (see langconfig.php or the top of {@link get_string_location}
* for supported keys
*/
function
format_date
(
$date
,
$formatkey
=
'strftimedatetime'
)
{
return
strftime
(
get_string
(
$formatkey
),
$date
);
}
?>
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