Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
Dwoo
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Common
Dwoo
Commits
9749a55f
Commit
9749a55f
authored
May 16, 2008
by
Seldaek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git-svn-id:
svn://dwoo.org/dwoo/trunk@63
0598d79b-80c4-4d41-97ba-ac86fbbd088b
parent
cfb65a97
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
CHANGELOG
CHANGELOG
+2
-0
date_format.php
lib/plugins/builtin/functions/date_format.php
+2
-2
No files found.
CHANGELOG
View file @
9749a55f
[
2008
--]
0.9.1
[
2008
--]
0.9.1
+
Added
{/}
shortcut
that
closes
the
last
opened
block
+
Added
{/}
shortcut
that
closes
the
last
opened
block
*
Optimized
scope
-
handling
functions
,
{
loop
}
and
{
with
}
are
now
slightly
faster
*
Optimized
scope
-
handling
functions
,
{
loop
}
and
{
with
}
are
now
slightly
faster
*
Fixed
a
bug
in
{
date_format
}
that
prevented
anything
but
unix
timestamps
to
work
[
2008
-
05
-
10
]
0.9.0
[
2008
-
05
-
10
]
0.9.0
! BC Break: changed all class names to be PEAR compliant (aka use underscores
! BC Break: changed all class names to be PEAR compliant (aka use underscores
...
...
lib/plugins/builtin/functions/date_format.php
View file @
9749a55f
...
@@ -23,13 +23,13 @@ function Dwoo_Plugin_date_format(Dwoo $dwoo, $value, $format='%b %e, %Y', $defau
...
@@ -23,13 +23,13 @@ function Dwoo_Plugin_date_format(Dwoo $dwoo, $value, $format='%b %e, %Y', $defau
{
{
if
(
!
empty
(
$value
))
if
(
!
empty
(
$value
))
{
{
//
don't convert if it's
a valid unix timestamp
//
convert if it's not
a valid unix timestamp
if
(
preg_match
(
'#^\d{10}$#'
,
$value
)
===
0
)
if
(
preg_match
(
'#^\d{10}$#'
,
$value
)
===
0
)
$value
=
strtotime
(
$value
);
$value
=
strtotime
(
$value
);
}
}
elseif
(
!
empty
(
$default
))
elseif
(
!
empty
(
$default
))
{
{
//
don't convert if it's
a valid unix timestamp
//
convert if it's not
a valid unix timestamp
if
(
preg_match
(
'#^\d{10}$#'
,
$default
)
===
0
)
if
(
preg_match
(
'#^\d{10}$#'
,
$default
)
===
0
)
$value
=
strtotime
(
$default
);
$value
=
strtotime
(
$default
);
else
else
...
...
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