www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16992] New: fromISOString, fromISOExtString, and

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

          Issue ID: 16992
           Summary: fromISOString, fromISOExtString, and fromSimpleString
                    do not have examples
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dlang.org
          Assignee: nobody puremagic.com
          Reporter: bachmeil yahoo.com

In std.datetime, there are no examples for fromISOString, fromISOExtString, and
fromSimpleString.

The examples need to make it clear how to properly call those functions.
Initially I followed the natural approach

import std.datetime, std.stdio;

void main() {
    writeln(fromISOString("20161208T032055"));
}

but it would not compile. Digging around, I found that it needs to be

writeln(DateTime.fromISOString("20161208T032055"));

--
Dec 20 2016