Correction mineure

This commit is contained in:
Alexandre MOTTIER 2025-02-05 22:52:22 +01:00
parent 8e5688bd13
commit 74bf802d8f

View File

@ -71,16 +71,16 @@
$aujourdhui = date("Y-m-d");
$diff = date_diff(date_create($daterencontre), date_create($aujourdhui));
if ($diff->format('%m') == 0) {
echo '<h1>Nous nous sommes rencontrés il y a environ '.$diff->format('%y').' ans.<br>';
echo '<h1>Nous nous sommes rencontrés il y a environ '.$diff->format('%y').' ans.<br>';
}else{
echo '<h1>Nous nous sommes rencontrés il y a environ '.$diff->format('%y').' ans et '.$diff->format('%m').' mois.<br>';
}
$datecouple = "2022-08-28";
$aujourdhui = date("Y-m-d");
$diff = date_diff(date_create($datecouple), date_create($aujourdhui));
$diff_jours = (strtotime($aujourdhui) - strtotime($datecouple)) / 86400;
if ($diff->format('%y') == 0){
if ($diff->format('%m') == 0) {
echo '<h2>Notre premier baiser 💋 était il y a '.$diff->format('%d').' jour(s).<br>';
@ -101,7 +101,7 @@ $datecouple = "2022-08-28";
if ($diff->format('%d') == 0) {
echo '<h2>Notre premier baiser 💋 était il y a '.$diff->format('%y').' an(s) et '.$diff->format('%m').' mois !<br>';
}else{
echo '<h2>Notre premier baiser 💋 était il y a '.$diff->format('%y').' an(s), '.$diff->format('%m').'mois et '.$diff->format('%d').' jour(s).<br>';
echo '<h2>Notre premier baiser 💋 était il y a '.$diff->format('%y').' an(s), '.$diff->format('%m').' mois et '.$diff->format('%d').' jour(s).<br>';
}
}
@ -130,7 +130,7 @@ echo "Cela fait " . $diff_jours . " jours.</h2>";
<td>&nbsp;31/12/2022 & 01/01/2023&nbsp;</td>
<td>&nbsp;Premier nouvel an ensemble 🎉&nbsp;</td>
</tr>
</table>
<h1>Lieux visités ensemble</h1>
@ -138,4 +138,3 @@ echo "Cela fait " . $diff_jours . " jours.</h2>";
</div>
</body>
</html>