Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
daee55e0
Commit
daee55e0
authored
May 17, 2001
by
Steven Wittens
Browse files
Updated the custom timestamp format to include locale support.
parent
30c236f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
includes/common.inc
View file @
daee55e0
...
...
@@ -131,7 +131,13 @@ function format_date($timestamp, $type = "medium", $format = "") {
$date
=
t
(
date
(
"l"
,
$timestamp
))
.
", "
.
t
(
date
(
"F"
,
$timestamp
))
.
" "
.
date
(
"d, Y - H:i"
,
$timestamp
);
break
;
case
"custom"
:
$date
=
date
(
$format
,
$timestamp
);
for
(
$i
=
strlen
(
$format
);
$i
>=
0
;
$c
=
$format
[
--
$i
])
{
if
(
strstr
(
"DFlMSw"
,
$c
))
$date
=
t
(
date
(
$c
,
$timestamp
))
.
$date
;
else
if
(
strstr
(
"AaBdgGhHiIjLmnrstTUYyZz"
,
$c
))
$date
=
date
(
$c
,
$timestamp
)
.
$date
;
else
$date
=
$c
.
$date
;
}
break
;
default
:
$date
=
t
(
date
(
"l"
,
$timestamp
))
.
", "
.
date
(
"m/d/Y - H:i"
,
$timestamp
);
...
...
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