Hello:
I'm trying to figure out how a particular event calendar is working.
I arrived at some code which I'm not quite sure what's going on here.
There is no documentation detailing the code so that's why I'm coming to you.
Can someone explain it to me? The specific area of code I'm not quite following is the the $GET['month'] = 2. Why select 2? The second half of the code dealing with Previous month and year totally doesn't make sense when the $GET['month'] == 2. To me, month 2 is February. How does 2 and 13 relate?
Thanks in advance.
Here's the bit of code:
IF($GET['month'] == 13){
$next_month = 2;
$next_year = $GET['year'] + 1;
} ELSE {
$next_month = $GET['month'] + 1;
$next_year = $GET['year'];
}
IF($GET['month'] == 2){
$prev_month = 13;
$prev_year = $GET['year'] - 1;
} ELSE {
$prev_month = $GET['month'] - 1;
$prev_year = $GET['year'];
}