Re: DateTime.opBinary

2015-11-30 Thread Chris Wright via Digitalmars-d-learn
On Mon, 30 Nov 2015 01:30:28 -0800, Jonathan M Davis via Digitalmars-d-learn wrote: > On Sunday, November 29, 2015 23:53:41 Chris Wright via > Digitalmars-d-learn wrote: >> Unfortunately, ddoc doesn't automatically cross-reference these for >> you, >> which results in confusion. (As if it weren't

Re: DateTime.opBinary

2015-11-30 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, November 29, 2015 23:53:41 Chris Wright via Digitalmars-d-learn wrote: > Unfortunately, ddoc doesn't automatically cross-reference these for you, > which results in confusion. (As if it weren't confusing enough to have > everything wrapped in templates with filters rather than simply us

Re: DateTime.opBinary

2015-11-29 Thread bachmeier via Digitalmars-d-learn
On Sunday, 29 November 2015 at 23:53:41 UTC, Chris Wright wrote: Duration is defined in core.time: https://dlang.org/phobos/ core_time.html#Duration Unfortunately, ddoc doesn't automatically cross-reference these for you, which results in confusion. (As if it weren't confusing enough to have

Re: DateTime.opBinary

2015-11-29 Thread bachmeier via Digitalmars-d-learn
On Sunday, 29 November 2015 at 23:52:05 UTC, anonymous wrote: You can add a Duration to a DateTime, giving you a new DateTime. And you can subtract a DateTime from another, giving you the Duration between them. Example: import std.datetime, std.stdio; void main() { DateTime oldYear =

Re: DateTime.opBinary

2015-11-29 Thread Chris Wright via Digitalmars-d-learn
On Sun, 29 Nov 2015 23:25:14 +, bachmeier wrote: > I was just reading through the documentation for std.datetime. > DateTime.opBinary looks pretty interesting: > > http://dlang.org/phobos/std_datetime.html#.DateTime.opBinary > > Does anyone know how to use it? You cer

Re: DateTime.opBinary

2015-11-29 Thread anonymous via Digitalmars-d-learn
On 30.11.2015 00:25, bachmeier wrote: I was just reading through the documentation for std.datetime. DateTime.opBinary looks pretty interesting: http://dlang.org/phobos/std_datetime.html#.DateTime.opBinary Does anyone know how to use it? You certainly can't learn anything fro

DateTime.opBinary

2015-11-29 Thread bachmeier via Digitalmars-d-learn
I was just reading through the documentation for std.datetime. DateTime.opBinary looks pretty interesting: http://dlang.org/phobos/std_datetime.html#.DateTime.opBinary Does anyone know how to use it? You certainly can't learn anything from the documentation, because duration is a mystery