Created
March 19, 2020 06:25
-
-
Save remoharsono/1d3eed27bdca266052ddff5a7cf51136 to your computer and use it in GitHub Desktop.
Get first day and last day of current month
This file contains 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 | |
$start_date_month = new DateTime("first day of this month"); | |
$end_date_month = new DateTime("last day of this month"); | |
echo $start_date_month->format('Y-m-d')."\n"; | |
echo $end_date_month->format('Y-m-d'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment