https://github.com/JuliaLang/julia
Revision 821c608ffeeb7bfc470270df2006c549b7672473 authored by Viriato5 on 06 April 2024, 17:24:11 UTC, committed by GitHub on 06 April 2024, 17:24:11 UTC
Issue #52989.
Originally checked on version 1.10.0 but still relevant in the current
version in master

Bug: When executing the method DateTime to create a DateTime value with
a string input only containing a year (ex: "2000") the method returns an
'ArgumentError: Invalid DateTime string' when it should, from what I
understood, return a DateTime like 2000-01-01T00:00:00 seeing as if you
call the same method with a number indicating a year (ex: 2000) the
method returns correctly.

Fix: The fix was simple, on the first tryparsenext_base10 block (line
207-211) where a year is parsed from the string the exit condition i >
end_pos should jump into 'done' so it returns a correct value instead of
'error'
1 parent 4e5bd66
History
Tip revision: 821c608ffeeb7bfc470270df2006c549b7672473 authored by Viriato5 on 06 April 2024, 17:24:11 UTC
Fix #52989: DateTime parser would return an error when parsing a year string (#53954)
Tip revision: 821c608
File Mode Size
.devcontainer
.github
base
cli
contrib
deps
doc
etc
src
stdlib
test
.buildkite-external-version -rw-r--r-- 5 bytes
.clang-format -rw-r--r-- 3.3 KB
.clangd -rw-r--r-- 114 bytes
.codecov.yml -rw-r--r-- 52 bytes
.git-blame-ignore-revs -rw-r--r-- 371 bytes
.gitattributes -rw-r--r-- 65 bytes
.gitignore -rw-r--r-- 571 bytes
.mailmap -rw-r--r-- 12.7 KB
CITATION.bib -rw-r--r-- 513 bytes
CITATION.cff -rw-r--r-- 1012 bytes
CONTRIBUTING.md -rw-r--r-- 23.4 KB
HISTORY.md -rw-r--r-- 388.0 KB
LICENSE.md -rw-r--r-- 1.3 KB
Make.inc -rw-r--r-- 56.4 KB
Makefile -rw-r--r-- 30.4 KB
NEWS.md -rw-r--r-- 4.4 KB
README.md -rw-r--r-- 7.4 KB
THIRDPARTY.md -rw-r--r-- 3.9 KB
VERSION -rw-r--r-- 11 bytes
julia.spdx.json -rw-r--r-- 37.8 KB
pkgimage.mk -rw-r--r-- 1.4 KB
sysimage.mk -rw-r--r-- 4.2 KB
typos.toml -rw-r--r-- 78 bytes

README.md

back to top