<?php

	// decalage horaire
date_default_timezone_set('Europe/Paris');

	// année en cours
	$year = date("Y");
	echo $year;
	echo "<BR>";

	$number = cal_days_in_month(CAL_GREGORIAN, 1, 2024); // 31
	echo "There were {$number} days in this month";

	// maintenant (au moment où le script est exécuté)
	//$now_date = new DateTime("now");
	//echo $now_date;
	
	echo "<BR>";
	
	$currentDate = date('d-m-Y');
	echo $currentDate;

	echo "<BR>";

	$start_date = new DateTime("2024-01-11");
	$end_date = new DateTime("2024-01-25");
 
	echo $start_date->getTimestamp();
	echo "<BR>";
	echo $end_date->getTimestamp();
	echo "<BR>";
	//echo "Timestamp start " + $start_date;
	//echo "Timestamp end " + $end_date;
 
	// objet interval
	$interval = $start_date->diff($end_date);
	
	echo "<BR>";
	
	echo $interval->format('%R%a days');
 
	//1704927600

	//Le "11/01/2024 à 00:00:00" correspond au timestamp : 1704927600.
	// 1704931200

	echo mktime(0, 0, 0, 01, 11, 2024);

	$today = getdate();
	print_r($today);

	$date=explode('-','2024-01-11');
	echo date('W',mktime(0,0,0,$date[1],$date[2],$date[0]));

	$date_test = "2024-01-11";
$good_format=strtotime ($date_test);
echo date('W',$good_format);

$mois = "01";
$jour = "11";
$annee = "2024";


$timestamp = mktime(0, 0, 0, $mois, $jour, $annee); //Donne le timestamp correspondant à cette date
 
echo date('D', $timestamp); //Ecrira les 3 premières lettres du jour en anglais, dans ton cas cela écrire Tue, si tu veux afficher Mardi il suffira juste alors de faire un tableau associatif, pareil si tu veux afficher 2.


?>