Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
ncphp
/
mcClasses
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit df267781
authored
Jul 28, 2011
by
Frederick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mcDate::checkIfFirstIsBefore Bug gelöst
1 parent
f89cef7a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
10 deletions
class_mcDate.inc.php
class_mcDate.inc.php
View file @
df26778
...
@@ -48,18 +48,11 @@ class mcDate {
...
@@ -48,18 +48,11 @@ class mcDate {
public
static
function
checkIfFirstIsBefore
(
$param_DateBefore
,
$param_DateAfter
)
{
public
static
function
checkIfFirstIsBefore
(
$param_DateBefore
,
$param_DateAfter
)
{
if
(
mcDate
::
check8601Date
(
$param_DateBefore
)
&&
mcDate
::
check8601Date
(
$param_DateAfter
))
{
if
(
mcDate
::
check8601Date
(
$param_DateBefore
)
&&
mcDate
::
check8601Date
(
$param_DateAfter
))
{
$DateBefore_jahr
=
substr
(
$param_DateBefore
,
0
,
4
);
$DateBefore_monat
=
substr
(
$param_DateBefore
,
5
,
2
);
$DateBefore_tag
=
substr
(
$param_DateBefore
,
8
,
2
);
$DateAfter_jahr
=
substr
(
$param_DateAfter
,
0
,
4
);
$DateAfter_monat
=
substr
(
$param_DateAfter
,
5
,
2
);
$DateAfter_tag
=
substr
(
$param_DateAfter
,
8
,
2
);
$DateBefore
=
mktime
(
null
,
null
,
null
,
substr
(
$param_DateBefore
,
5
,
2
),
substr
(
$param_DateBefore
,
8
,
2
),
substr
(
$param_DateBefore
,
0
,
4
));
$DateAfter
=
mktime
(
null
,
null
,
null
,
substr
(
$param_DateAfter
,
5
,
2
),
substr
(
$param_DateAfter
,
8
,
2
),
substr
(
$param_DateAfter
,
0
,
4
));
if
(
$DateBefore_jahr
<=
$DateAfter_jahr
if
(
$DateBefore
<=
$DateAfter
)
{
&&
$DateBefore_monat
<=
$DateAfter_monat
&&
$DateBefore_tag
<=
$DateAfter_tag
)
{
return
true
;
return
true
;
}
else
{
}
else
{
return
false
;
return
false
;
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment