McNavy McNavy - 7 months ago 73
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?


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'));