You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation of splitDateTime seems to rely upon _base_parseDate() throwing an exception, and then parsing
the results of that exception. This seems rather error prone since an exception is being used for a non-exceptional
(expected) condition and the code is subject to breakage if the format of the exception message changes.
But my problem was that the dateTimeString parsed just fine (even though the default date format did not
include the time) so no exception was thrown, and the code would always cut off the time segment.
So I added code that handles the case where _base_parseDate() doesn't throw, and just split the
dateTimeString on the separator.
I'd be interested to hear if I was doing something wrong which was causing parseDate() not to fail, but once again
depending upon the exception to be thrown seems like trouble to me...
0 commit comments