[Issue 13533] DateTime.fromISOExtString should also accept space separator (instead of 'T')

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Oct 6 20:18:14 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=13533

Jonathan M Davis <jmdavisProg at gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jmdavisProg at gmx.com

--- Comment #2 from Jonathan M Davis <jmdavisProg at gmx.com> ---
Honestly, I think that toSimpleString should just be gotten rid of. It was a
mistake to include it. It's only there because Boost had it.

Regardless, I think that what's really needed here is either that a string like
"2014-09-26 10:20:30 +0200" should be mutated to match the ISO extended format
by replacing the first space with a T and removing the second space, or it
should be solved with custom date-time formatting functionality, which
std.datetime really should have but which I haven't gotten to yet. I do not
think that it makes sense to make any of the from*String functions lax in what
they accept. I think that that sort of thing is almost always a bad idea. I
think that the from*String functions should only accept what their
corresponding to*String functions emit, which is what is standard. The only
exception is that the number of decimal places in the fractional seconds isn't
fixed, because the standard doesn't specify that. Everything else is exactly
the same on both sides.

--


More information about the Digitalmars-d-bugs mailing list