Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DateTimeFormatter: Add option to return invalid date string unfiltered #2

Open
7 tasks done
weierophinney opened this issue Dec 31, 2019 · 1 comment
Open
7 tasks done

Comments

@weierophinney
Copy link
Member

  • Are you fixing a bug?
    • Detail how the bug is invoked currently.
$filter = new DateTimeFormatter();
$filter->filter('2013-31-31'); // throws exception
  • Detail the original, incorrect behavior.
    DateTimeFormatter::filter throws an exception in the event that the input is not a parsable date string
  • Detail the new, expected behavior.
$filter = new DateTimeFormatter();
$filter->setThrowInvalidDateException(false);
$filter->filter('2013-31-31'); // returns "2013-31-31"
  • Base your feature on the master branch, and submit against that branch.
  • Add a regression test that demonstrates the bug, and proves the fix.
  • Add a CHANGELOG.md entry for the fix.

Originally posted by @marcguyer at zendframework/zend-filter#84

@weierophinney
Copy link
Member Author

@marcguyer This is a new feature because the exception was previously a desired result. Please use the develop branch instead.


Originally posted by @froschdesign at zendframework/zend-filter#84 (comment)

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

No branches or pull requests

1 participant