Last active
August 31, 2022 03:39
-
-
Save rwaddin/29bf496e3dff3d8f358040bbae09a438 to your computer and use it in GitHub Desktop.
embed medium
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# mengurangi hari | |
$tgl = "2022-03-02"; | |
$date = date("Y-m-d", strtotime($tgl."-10 days")); | |
echo $date; // 2022-02-20 | |
# menambah hari | |
$tgl = "2022-03-02"; | |
$date = date("Y-m-d", strtotime($tgl."+10 days")); | |
echo $date; // 2022-03-12 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment