On parsing the last second of the month, you get back the next day.
Carbon::parse('2016-09-31 23:59:59')->toDateTimeString() => "2016-10-01 23:59:59"
Unfortunately there are only 30 days in September ;-)
@lucasmichot oops! My bad. still would be nice to return ->lastDayOfMonth().
Thanks!
I think this is already the purpose of ->daysInMonth and ->endOfMonth() ?
Can this be closed @rohstar ?
Most helpful comment
I think this is already the purpose of
->daysInMonthand->endOfMonth()?