cakephp / chronos

A standalone DateTime library originally based off of Carbon

Home Page:http://book.cakephp.org/chronos

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Invalid deprecation error for Date::startOfWeek()

jurchiks opened this issue · comments

I just updated my installation of Chronos to the latest available version for the project (PHP 7.3, so best I get is 2.4.4), and I got this nonsensical error:
(new Date($anyDateHere))->addWeeks(1)->startOfWeek()
throws
2.5 startOfDay() will be removed in 3.x.
But this method calls startOfDay() implicitly, under the hood, users can't NOT call it.

@markstory What do you think?

startOfDay() just does return $this->modify('midnight');.

So why not do that where startOfDay() is currently called?

Same for endOfDay(), by the way.