0 votes
1.6k 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 809 views
0 votes
1 answer 812 views
0 votes
1 answer 726 views
asked May 25, 2021 in General by Tester jjavelin (120 points)
0 votes
1 answer 917 views
asked Oct 29, 2021 in General by anonymous
...