I'm Trying to get Current Month First Week And Last Week Of Date Using LARAVEL Carbon. I'm Try
$date = 01-04-2021; $dateObject_for_week = Carbon::createFromFormat('d-m-Y', $date ); $start_of_week = $dateObject_for_week->startOfWeek()->toDateString(); $End_of_week = $dateObject_for_week->endOfWeek()->toDateString(); echo $start_of_week; echo $End_of_week;
Than I'm Getting 2021-03-29
And 2021-04-04
But I need 2021-04-01
To 2021-04-04
It Is Possible ?
Thank You
https://stackoverflow.com/questions/66810949/how-to-get-current-month-first-week-and-last-week-date-using-carbon March 26, 2021 at 12:11PM
没有评论:
发表评论