Commit 88de8c37 authored by Zachary Doll's avatar Zachary Doll

Add a year check to the cakedaypost rule

parent 29d1c3b8
......@@ -14,13 +14,16 @@ class CakeDayPost implements YagaRule {
// Determine if today is the target day
$CakeDate = strtotime($User->DateInserted);
$CakeYear = date('Y', $CakeDate);
$CakeMonth = date('n', $CakeDate);
$CakeDay = date('j', $CakeDate);
$TodaysYear = date('Y');
$TodaysMonth = date('n');
$TodaysDay = date('j');
if($CakeMonth == $TodaysMonth
&& $CakeDay == $TodaysDay) {
&& $CakeDay == $TodaysDay
&& $CakeYear != $TodaysYear) {
return TRUE;
}
else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment