mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
Handle dates passed wrong way round - thanks marj
This commit is contained in:
@@ -11,8 +11,8 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_handlers/date_handler.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/date_handler.php,v $
|
||||||
| $Revision: 1.2 $
|
| $Revision: 1.3 $
|
||||||
| $Date: 2006-12-22 20:46:53 $
|
| $Date: 2006-12-23 15:44:31 $
|
||||||
| $Author: e107steved $
|
| $Author: e107steved $
|
||||||
|
|
|
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
@@ -75,6 +75,12 @@ class convert
|
|||||||
If start day > end day, we cross a month boundary. Calculate last day of start date. Otherwise we can just do a simple difference.
|
If start day > end day, we cross a month boundary. Calculate last day of start date. Otherwise we can just do a simple difference.
|
||||||
*/
|
*/
|
||||||
$newer_date = ($newer_date == FALSE ? (time()) : $newer_date);
|
$newer_date = ($newer_date == FALSE ? (time()) : $newer_date);
|
||||||
|
if($older_date>$newer_date)
|
||||||
|
{ // Just in case the wrong way round
|
||||||
|
$tmp=$newer_date;
|
||||||
|
$newer_date=$older_date;
|
||||||
|
$older_date=$tmp;
|
||||||
|
}
|
||||||
$new_date = getdate($newer_date);
|
$new_date = getdate($newer_date);
|
||||||
$old_date = getdate($older_date);
|
$old_date = getdate($older_date);
|
||||||
$result = array();
|
$result = array();
|
||||||
|
Reference in New Issue
Block a user