Re: [go-nuts] time.ParseDuration does not accept scientific notation

2024-04-26 Thread Scott Pakin
On Friday, April 26, 2024 at 6:08:02 PM UTC-6 Ian Lance Taylor wrote:

The first step would be to open a proposal for this change. See 
https://github.com/golang/proposal#readme. Thanks. 


Done: proposal: time: allow scientific notation in ParseDuration 
.

Thanks for the link. 

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/6e381542-3184-42a3-b647-07397786be38n%40googlegroups.com.


Re: [go-nuts] time.ParseDuration does not accept scientific notation

2024-04-26 Thread Ian Lance Taylor
On Fri, Apr 26, 2024 at 3:39 PM Scott Pakin  wrote:
>
> While parsing output from some third-party program, I discovered that 
> time.ParseDuration does not accept inputs expressed in scientific notation 
> even though strconv.ParseFloat does accept such inputs. Here’s an playground 
> example demonstrating this limitation: https://go.dev/play/p/G-1FveHxpZ3.
>
> Any chance ParseDuration could be enhanced to accept the same numerical 
> values as ParseFloat?

The first step would be to open a proposal for this change.  See
https://github.com/golang/proposal#readme.  Thanks.

Ian

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAOyqgcXGQPCBJN%3D-yK7qDmKTUfcLUHsO-Sd4Cj81ub-uWAVVaw%40mail.gmail.com.