Skip to content

Conversation

@davidespagnoli
Copy link

missing date information are now reset to 0 (1970-01-01T00:00:00), because otherwise they are taken from current date/time (please refer to https://www.php.net/manual/en/datetimeimmutable.createfromformat.php), so:

Respect\Validation\Validator::date("m")->isValid('06')

is valid if it's run on October 30
is not valid if it's run on October, 31

missing date information are now reset to 0 (1970-01-01T00:00:00), because otherwise they are taken from current date/time, so:
Respect\Validation\Validator::date("m")->isValid('06')
is not valid on 31st of every month
Refactor date validation tests to include time freezing.
Updated the test for date validation to check overflow days without using timecop.
Fix comment formatting for clarity in test case.
Corrected a typo in the test method documentation.
Use timecop to freeze time for date validation tests.
Removed 'timecop-beta' extension from PHP setup in CI workflow.
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.

1 participant