Closed aramhuseiny closed 2 years ago
I checked the formula,
This is the current one that calculates wrong
ceil(($this->getDayOfWeek() + $this->day) / 7);
I think you can use this that I suggest:
floor(($this->day + 7 - $this->getDayOfWeek()) / 7) + 1
Actually the base value of "7" is not valid in all cases.
New formula should be like this:
floor(($this->day + 5 - $this->getDayOfWeek()) / 7) + 1
Hi, Thank you for this powerful package you made.
I try to use weekOfMonth method for a specific date, but I found there is a mistake in the formula that calculates that.