Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
390b1e35
Commit
390b1e35
authored
Oct 04, 2002
by
Kjartan
Browse files
- changed format_date to allow W (week of year) in a custom format.
parent
ebcd319d
Changes
1
Hide whitespace changes
Inline
Side-by-side
includes/common.inc
View file @
390b1e35
...
...
@@ -536,10 +536,10 @@ function format_date($timestamp, $type = "medium", $format = "") {
case
"custom"
:
for
(
$i
=
strlen
(
$format
);
$i
>=
0
;
$c
=
$format
[
--
$i
])
{
if
(
strstr
(
"DFlMSw"
,
$c
))
{
$date
=
t
(
date
(
$c
,
$timestamp
))
.
$date
;
$date
=
t
(
date
(
$c
,
$timestamp
))
.
$date
;
}
else
if
(
strstr
(
"AaBdgGhHiIjLmnrstTUYyZz"
,
$c
))
{
$date
=
date
(
$c
,
$timestamp
)
.
$date
;
else
if
(
strstr
(
"AaBdgGhHiIjLmnrstTU
W
YyZz"
,
$c
))
{
$date
=
date
(
$c
,
$timestamp
)
.
$date
;
}
else
{
$date
=
$c
.
$date
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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