- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Closed
Description
When using the date format "s"
,tryparse
throws an InexactError
in the case the input is not parsable as milliseconds. The throw InexactError
was introduced in #22198 following issue #22100. I suppose we could simply return nothing
instead of throwing here? 🙂
Line 153 in a0093d2
r == 0 || throw(InexactError(:convert, Decimal3, ms0)) |
Example:
using Dates; tryparse(Date, "2018-01-01", DateFormat("s"))
I created a PR for this change: #44004
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
throw InexactError
fromtryparsenext
#44004Dates parsing: remove `throw InexactError` from `tryparsenext`, fixes #…
Dates parsing: remove `throw InexactError` from `tryparsenext`, fixes #…
Dates parsing: remove `throw InexactError` from `tryparsenext`, fixes #…
Dates parsing: remove `throw InexactError` from `tryparsenext`, fixes J…
Dates parsing: remove `throw InexactError` from `tryparsenext`, fixes J…
Dates parsing: remove `throw InexactError` from `tryparsenext`, fixes #…