[Issue 16992] New: fromISOString, fromISOExtString, and fromSimpleString do not have examples

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Dec 20 07:20:41 PST 2016


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 at puremagic.com
          Reporter: bachmeil at 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"));

--


More information about the Digitalmars-d-bugs mailing list