Next expiry is allways 1 year from given time, not the nearest august 1.
This commit is contained in:
1 parent
4507aa1c77
commit
ec4e3b6b34
1 file changed
+8
-14
+8
-14
@@ -1583,21 +1583,15 @@ function getNextMembershipExpiryDate()
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns the next expiry date for a given time.
|
||||
* Returns the expiry date for a given time.
|
||||
*/
|
||||
function getExpiryDate($time = null)
|
||||
{
|
||||
if($time == null) $time = time();
|
||||
$time = is_numeric($time)?$time:strtotime($time);
|
||||
|
||||
if (date("m-d", $time) > "08-01" )
|
||||
{
|
||||
return date("Y", strtotime("+1 year", $time)) . '-08-01';
|
||||
}
|
||||
else
|
||||
{
|
||||
return date("Y", $time) . '-08-01';
|
||||
}
|
||||
function getExpiryDate($time = null) {
|
||||
if($time == null) {
|
||||
$time = time();
|
||||
}
|
||||
$time = is_numeric($time) ? $time : strtotime($time);
|
||||
|
||||
return date("Y-m-d", strtotime("+1 year", $time));
|
||||
}
|
||||
|
||||
// Migration (nikolark)
|
||||
|
||||
Reference in new issue
Block a user