[ad_1]
Hi,
Can I use wp_date() in a script to determine a certain day in the site’s timezone, or should I not use the function this way?
For example, I use this to determine which day it is:
$today = current_datetime()->getTimestamp();
$day = wp_date('w', $today);
if ($day == '0') {
echo 'It's sunday';
}Guess it’s improper use, but just curious how you think about this..
Guido
