Page MenuHomekolab.org

Use ->addMonthsWithoutOverflow() and ->subMonthsWithoutOverflow()
ClosedPublic

Authored by vanmeeuwen on Mar 30 2020, 10:50 AM.

Details

Summary

Carbon::now()->subMonth(1) for 2020-03-30 will end up as 2020-03-01, which simply isn't a month.

Test Plan

phpunit failed.

apply change.

phpunit succeeds.

Diff Detail

Repository
rK kolab
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

vanmeeuwen requested review of this revision.Mar 30 2020, 10:50 AM
vanmeeuwen created this revision.
machniak accepted this revision.Mar 30 2020, 11:04 AM
machniak added a subscriber: machniak.

I'd re-check on 1st of month.

This revision is now accepted and ready to land.Mar 30 2020, 11:04 AM
This revision was automatically updated to reflect the committed changes.