Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DateTime.new(Str) limited year range #4909

Open
p6rt opened this issue Dec 23, 2015 · 4 comments
Open

DateTime.new(Str) limited year range #4909

p6rt opened this issue Dec 23, 2015 · 4 comments
Labels
LTA Less Than Awesome; typically an error message that could be better

Comments

@p6rt
Copy link

p6rt commented Dec 23, 2015

Migrated from rt.perl.org#127004 (status was 'open')

Searchable as RT127004$

@p6rt
Copy link
Author

p6rt commented Dec 23, 2015

From zefram@fysh.org

DateTime.new on a Str input only accepts years in the range 0 to 9999
inclusive. The class is actually capable of handling year numbers outside
that range, in both directions, and accepts them in numeric .new inputs.
It would be more awesome, and not at all difficult, to accept the full
unlimited range of year numbers in ISO 8601 string input. (Don't forget
to apply the proper rules regarding the use of sign characters.)

-zefram

@p6rt
Copy link
Author

p6rt commented Dec 23, 2015

From @lizmat

On 23 Dec 2015, at 23​:16, Zefram (via RT) <perl6-bugs-followup@​perl.org> wrote​:

# New Ticket Created by Zefram
# Please include the string​: [perl #​127004]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=127004 >

DateTime.new on a Str input only accepts years in the range 0 to 9999
inclusive. The class is actually capable of handling year numbers outside
that range, in both directions, and accepts them in numeric .new inputs.
It would be more awesome, and not at all difficult, to accept the full
unlimited range of year numbers in ISO 8601 string input. (Don't forget
to apply the proper rules regarding the use of sign characters.)

Fixed with 895546990f6001a5999ef , tests added with 2763fa2f07970913da

Can be closed.

Liz

@p6rt
Copy link
Author

p6rt commented Dec 23, 2015

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Dec 24, 2015

From zefram@fysh.org

Elizabeth Mattijsen via RT wrote​:

Fixed with 895546990f6001a5999ef

With that edit, some invalid year representations are now accepted on
input, such as "-0000" and "12345". They add to the scope of [perl
#​127002].

-zefram

@p6rt p6rt added the LTA Less Than Awesome; typically an error message that could be better label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTA Less Than Awesome; typically an error message that could be better
Projects
None yet
Development

No branches or pull requests

1 participant