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

Date.new(Str) limited year range #4915

Closed
p6rt opened this issue Dec 23, 2015 · 5 comments
Closed

Date.new(Str) limited year range #4915

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

Comments

@p6rt
Copy link

p6rt commented Dec 23, 2015

Migrated from rt.perl.org#127010 (status was 'resolved')

Searchable as RT127010$

@p6rt
Copy link
Author

p6rt commented Dec 23, 2015

From zefram@fysh.org

Date.new on a Str input only accepts non-negative year numbers​:

Date.new("-1234-01-01")
Invalid Date string '-1234-01-01'; use yyyy-mm-dd instead
  in any at /home/zefram/usr/rakudo/rakudo/install/share/perl6/runtime/./CORE.setting.moarvm​:1
  in block <unit> at <unknown file>​:1

The class is actually capable of handling negative year numbers, 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 24, 2015

From @lizmat

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

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

Date.new on a Str input only accepts non-negative year numbers​:

Date.new("-1234-01-01")
Invalid Date string '-1234-01-01'; use yyyy-mm-dd instead
in any at /home/zefram/usr/rakudo/rakudo/install/share/perl6/runtime/./CORE.setting.moarvm​:1
in block <unit> at <unknown file>​:1

The class is actually capable of handling negative year numbers, 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 fb475d22ba6d5507dd4db , test added with 7e5f5db4e12a07701c4da .

Liz

@p6rt
Copy link
Author

p6rt commented Dec 24, 2015

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

@p6rt
Copy link
Author

p6rt commented Dec 31, 2015

From @usev6

On Thu Dec 24 01​:37​:47 2015, elizabeth wrote​:

Fixed with fb475d22ba6d5507dd4db , test added with
7e5f5db4e12a07701c4da .

Great! I'm closing the ticket as 'resolved'.

@p6rt
Copy link
Author

p6rt commented Dec 31, 2015

@usev6 - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Dec 31, 2015
@p6rt p6rt added LTA Less Than Awesome; typically an error message that could be better testcommitted labels 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 testcommitted
Projects
None yet
Development

No branches or pull requests

1 participant