September 26, 2014 [Issue 13533] New: DateTime.fromSimpleString should accept numerical months | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=13533 Issue ID: 13533 Summary: DateTime.fromSimpleString should accept numerical months Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement Priority: P1 Component: Phobos Assignee: nobody@puremagic.com Reporter: code@dawg.eu I often stumble over datetime strings in this format. 2014-09-26 10:20:30 +0200 Most notably MySQL and Ruby's Time class use it. I haven't yet found a good way to parse this format into a DateTime. The function fromSimpleString will only accept date formats with abbreviated months as in `2014-Sep-26 10:20:30 +0200`, fromISOExtString OTOH requires a 'T' between the date and uses a different format for the timezone. So it would be nice if Date.fromSimpleString accepted "2014-09-26". Workarounds aren't really possible, e.g. because SimpleTimeZone.fromISOString isn't accessible. -- |
Copyright © 1999-2021 by the D Language Foundation