Actions
Feature #14672
openIntroduce a Date.safe_parse method
Feature #14672:
Introduce a Date.safe_parse method
Status:
Open
Assignee:
-
Target version:
-
Description
This feature request is about a Date.safe_parse method.
The method should call the original Date.parse method but avoid raising an exception and returning a fallback value instead.
An implementation in ActiveSupport has been proposed here: https://github.com/rails/rails/pull/32503/files.
This would avoid the necessity to rescue possible Exceptions everytime.
See:
Actions