So it's not php, but the programmer that put that series of statements together... That code isn't part of the base install as I couldn't find it... The important part in that section is understanding what the value of $upcoming_date_check is based on... The series of case statements will be evaluated from top to bottom, typically whichever is true first is executed...

The only thing I see about the added code is that basically both are true if they are equal, which means that whichever is first would be the one to "win"...