Skip to content

Conversation

@nokios
Copy link

@nokios nokios commented Mar 17, 2021

This class states that Sunday is 0, but then uses 'MO' as the first element of the array. As a result, the $weekday is wrong, and is one day off.

This class states that Sunday is 0, but then uses 'MO' as the first element of the array. As a result, the `$weekday` is wrong, and is one day off.
@simshaun
Copy link
Owner

This causes lots of test failures. I don't have time to look in to the issue right now. If you do, you can run the tests with ./vendor/bin/phpunit

@nokios
Copy link
Author

nokios commented Mar 26, 2021

I will attempt to have a go at it probably next week.

public $num;

protected $days = array('MO', 'TU', 'WE', 'TH', 'FR', 'SA', 'SU');
protected $days = array('SU', 'MO', 'TU', 'WE', 'TH', 'FR', 'SA');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there an RFC that says what day is first ? (even if $weekday says 0 is Sunday)

@gazben
Copy link

gazben commented Nov 24, 2022

I got into problems regarding the issue too. Here is my solution: #203

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants