We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 565265d commit 4c8a12eCopy full SHA for 4c8a12e
src/parsing.jl
@@ -297,20 +297,17 @@ _DEFAULT_TYPE_MAP[:time] = Time
297
function pqparse(::Type{Time}, str::AbstractString)
298
@static if v"1.6.6" <= VERSION < v"1.7.0" || VERSION >= "1.7.2"
299
result = tryparse(Time, str)
300
- if isnothing(result)
301
- # If there's an error we want to see it here
302
- result = parse(Time, _trunc_seconds(str))
303
- end
304
- return result
+ # If there's an error we want to see it here
+ return isnothing(result) ? parse(Time, _trunc_seconds(str)) : result
305
else
306
try
307
return parse(Time, str)
308
catch err
309
if !(err isa InexactError)
310
rethrow(err)
311
end
312
- return parse(Time, _trunc_seconds(str))
313
+ return parse(Time, _trunc_seconds(str))
314
315
316
0 commit comments