Re: std.getopt and std.datetime

2017-05-13 Thread Russel Winder via Digitalmars-d-learn
On Sat, 2017-05-13 at 02:23 -0700, Jonathan M Davis via Digitalmars-d- learn wrote: > […] > At best, it's slang. It's not proper anything. > > https://github.com/dlang/phobos/pull/5388 > > - Jonathan M Davis Indeed. Thanks for getting a pull request in to ameliorate the difficulty. -- Russel.

Re: std.getopt and std.datetime

2017-05-13 Thread Jonathan M Davis via Digitalmars-d-learn
On Saturday, May 13, 2017 06:53:25 Russel Winder via Digitalmars-d-learn wrote: > Is there a canonical, idiomatic way of processing std.datetime objects > using std.getopt? > > Currently, I am suffering: > > /usr/include/d/std/getopt.d(921): Error: static assert "Dunno how to deal > with type Sys

Re: std.getopt and std.datetime

2017-05-12 Thread Russel Winder via Digitalmars-d-learn
On Sat, 2017-05-13 at 06:05 +, Vladimir Panteleev via Digitalmars- d-learn wrote: > On Saturday, 13 May 2017 at 05:53:25 UTC, Russel Winder wrote: > > Is there a canonical, idiomatic way of processing std.datetime > > objects using std.getopt? > > As std.getopt is going to give you strings, y

Re: std.getopt and std.datetime

2017-05-12 Thread Vladimir Panteleev via Digitalmars-d-learn
On Saturday, 13 May 2017 at 05:53:25 UTC, Russel Winder wrote: Is there a canonical, idiomatic way of processing std.datetime objects using std.getopt? As std.getopt is going to give you strings, you need to convert strings to SysTime values, e.g. using fromSimpleString: import std.datetime;

std.getopt and std.datetime

2017-05-12 Thread Russel Winder via Digitalmars-d-learn
Is there a canonical, idiomatic way of processing std.datetime objects using std.getopt? Currently, I am suffering: /usr/include/d/std/getopt.d(921): Error: static assert "Dunno how to deal with type SysTime*" which on the one hand is understandable, albeit dreadful English, but then I suppose