what is the best way to check this time interval? from 8th December to 8January, every year!
if (time interval) { // echo something; }
Being more specific
if (today = 7 december) //false if (today = 8 dec) // true if (today = 9 dec) // true if (today = 10 dec) // true ... if (today = 7 jan) // true if (today = 8 jan) // true if (today = 9 jan) // false
Use [man]date/man twice to get the day number and month number, then you simply check if both conditions are true (e.g. (day >= 8 && month == 12) || (day <= 8 && month == 1)).