Correction mineure
This commit is contained in:
parent
8e5688bd13
commit
74bf802d8f
11
index.php
11
index.php
|
@ -71,16 +71,16 @@
|
||||||
$aujourdhui = date("Y-m-d");
|
$aujourdhui = date("Y-m-d");
|
||||||
$diff = date_diff(date_create($daterencontre), date_create($aujourdhui));
|
$diff = date_diff(date_create($daterencontre), date_create($aujourdhui));
|
||||||
if ($diff->format('%m') == 0) {
|
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{
|
}else{
|
||||||
echo '<h1>Nous nous sommes rencontrés il y a environ '.$diff->format('%y').' ans et '.$diff->format('%m').' mois.<br>';
|
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";
|
$datecouple = "2022-08-28";
|
||||||
$aujourdhui = date("Y-m-d");
|
$aujourdhui = date("Y-m-d");
|
||||||
$diff = date_diff(date_create($datecouple), date_create($aujourdhui));
|
$diff = date_diff(date_create($datecouple), date_create($aujourdhui));
|
||||||
$diff_jours = (strtotime($aujourdhui) - strtotime($datecouple)) / 86400;
|
$diff_jours = (strtotime($aujourdhui) - strtotime($datecouple)) / 86400;
|
||||||
|
|
||||||
if ($diff->format('%y') == 0){
|
if ($diff->format('%y') == 0){
|
||||||
if ($diff->format('%m') == 0) {
|
if ($diff->format('%m') == 0) {
|
||||||
echo '<h2>Notre premier baiser 💋 était il y a '.$diff->format('%d').' jour(s).<br>';
|
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) {
|
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>';
|
echo '<h2>Notre premier baiser 💋 était il y a '.$diff->format('%y').' an(s) et '.$diff->format('%m').' mois !<br>';
|
||||||
}else{
|
}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> 31/12/2022 & 01/01/2023 </td>
|
<td> 31/12/2022 & 01/01/2023 </td>
|
||||||
<td> Premier nouvel an ensemble 🎉 </td>
|
<td> Premier nouvel an ensemble 🎉 </td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h1>Lieux visités ensemble</h1>
|
<h1>Lieux visités ensemble</h1>
|
||||||
|
@ -138,4 +138,3 @@ echo "Cela fait " . $diff_jours . " jours.</h2>";
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user