0 votes
581 views
asked in General by
Hi there,

I want to change my website logo to something special on every Friday between night 8PM and 1AM. Theoretically 1AM is on the next day which is Saturday. How to do this with PHP ? Thanks in advance.

- Mike

1 Answer

0 votes
answered by

It is easy with strtotime() ;)

$current_time = strtotime('now');
if ($current_time > strtotime('friday this week 8:00pm') && $current_time < strtotime('saturday this week 1:00am')) {
    // Special logo
}

Related questions

0 votes
1 answer 9.9k views
asked Aug 19, 2016 in General by Shed
0 votes
2 answers 8.1k views
0 votes
1 answer 58 views
asked Aug 18, 2016 in General by Azi Graeber
...