Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Get All dates of a month

 get all of dates ( day ) from a month...

$month = '2015-01';
$start = Carbon::parse($month)->startOfMonth();
$end = Carbon::parse($month)->endOfMonth();

$dates = [];
while ($start->lte($end)) {
     $dates[] = $start->copy();
     $start->addDay();
}

echo "<pre>", print_r($dates), "</pre>";
Source by github.com #
 
PREVIOUS NEXT
Tagged: #Get #All #dates #month
ADD COMMENT
Topic
Name
9+2 =