I'd like to perform this operation (filtering out weekends), but have the result returned in float months:
$weekdiff = ($carbonFrom->diffInDaysFiltered(function(Carbon $date) {
return !$date->isWeekend();
}, $carbonTo) + 1) / 5;
Is there a way to get the float difference in months between two dates while filtering out weekends?
Thank you!
source https://stackoverflow.com/questions/71414384/carbon-float-difference-in-months-filtered
No comments:
Post a Comment