McNavy McNavy - 1 year ago 134
PHP Question

Current date - Go to next Thursday - PHP

This is my code for get the current date in french (I'm french) and the current time :


setlocale (LC_TIME, 'fr_FR.utf8','fra');

// FIX date & time email
$date_line = strftime("%A %d %B");
$time_line = date('H:i:s');


With this result, I want to find a method for : How to get date of the Thursday since the current date please?

Answer Source

Just use a relative date format. In this case 'next Thursday'. Here's a basic example:

$time_line = date('Y-m-d', strtotime('next Thursday'));


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download