Yvan1263
Yvan1263

Reputation: 80

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 :

<?php

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?

Upvotes: 1

Views: 45

Answers (1)

John Conde
John Conde

Reputation: 219804

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

Demo

Upvotes: 3

Related Questions