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 screws up comma as decimal point #4908

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

DateTime.new screws up comma as decimal point #4908

p6rt opened this issue Dec 23, 2015 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Dec 23, 2015

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

Searchable as RT127003$

@p6rt
Copy link
Author

p6rt commented Dec 23, 2015

From zefram@fysh.org

DateTime.new on a Str input, per ISO 8601​:2004 clause 4.2.2.4, attempts to
accept either comma or full stop as the decimal point in the seconds part,
but it screws up the comma case, failing to convert it to a numeric value.

DateTime.new("2000-01-01T00​:00​:00.0").perl
DateTime.new(​:year(2000), :month(1), :day(1), :hour(0), :minute(0), :second(0.0))
DateTime.new("2000-01-01T00​:00​:00,0").perl
Cannot convert string to number​: trailing characters after number in '00^,0' (indicated by ^)
  in block <unit> at <unknown file>​:1

-zefram

@p6rt
Copy link
Author

p6rt commented Dec 23, 2015

From @lizmat

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

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

DateTime.new on a Str input, per ISO 8601​:2004 clause 4.2.2.4, attempts to
accept either comma or full stop as the decimal point in the seconds part,
but it screws up the comma case, failing to convert it to a numeric value.

DateTime.new("2000-01-01T00​:00​:00.0").perl
DateTime.new(​:year(2000), :month(1), :day(1), :hour(0), :minute(0), :second(0.0))
DateTime.new("2000-01-01T00​:00​:00,0").perl
Cannot convert string to number​: trailing characters after number in '00^,0' (indicated by ^)
in block <unit> at <unknown file>​:1

Fixed in 18947f4249aa0c11a1f1ac3 , test added with 38e988158507ee040ab33e .

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 31, 2015

From @usev6

On Wed Dec 23 15​:00​:46 2015, elizabeth wrote​:

Fixed in 18947f4249aa0c11a1f1ac3 , test added with
38e988158507ee040ab33e .

Can be closed.

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

@p6rt p6rt closed this as completed Dec 31, 2015
@p6rt
Copy link
Author

p6rt commented Dec 31, 2015

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant