Skip to content
This repository has been archived by the owner on Oct 7, 2023. It is now read-only.

Commit

Permalink
Create KJxFoc.php
Browse files Browse the repository at this point in the history
Signed-off-by: Neelyooo <neelkamalpattanaik13@gmail.com>
  • Loading branch information
Neelyooo authored and CodingWithHardik committed Oct 6, 2023
1 parent 00e5c82 commit f772747
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions bij2Ti/KJxFoc.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php
// Define two date strings
$date1 = "2023-10-10";
$date2 = "2023-10-03";

// Convert date strings to DateTime objects
$datetime1 = new DateTime($date1);
$datetime2 = new DateTime($date2);

// Calculate the difference between the two dates
$interval = $datetime1->diff($datetime2);

// Display the difference in the same format
echo "Difference: " . $interval->format('%y years, %m months, %d days');
?>

0 comments on commit f772747

Please sign in to comment.