0 votes
1.4k views
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
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 608 views
0 votes
1 answer 619 views
0 votes
1 answer 541 views
asked May 25, 2021 in General by Tester jjavelin (120 points)
0 votes
1 answer 593 views
asked Oct 29, 2021 in General by anonymous
...