View source code
Display the source code in std/datetime/interval.d from which this
page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a
Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
local clone.
std.datetime.interval.Interval.this
- multiple declarations
Function Interval.this
this(U)
(
in TP begin,
in U end
) pure
if (is(Unqual!TP == Unqual!U));
Parameters
Name | Description |
---|---|
begin | The time point which begins the interval. |
end | The time point which ends (but is not included in) the interval. |
Throws
DateTimeException
if end is
before begin.
Example
Interval!Date(Date(1996, 1, 2), Date(2012, 3, 1));
Function Interval.this
this(D)
(
in TP begin,
in D duration
) pure
if (__traits(compiles, begin + duration));
Parameters
Name | Description |
---|---|
begin | The time point which begins the interval. |
duration | The duration from the starting point to the end point. |
Throws
DateTimeException
if the resulting
end
is before begin
.
Example
assert(Interval!Date(Date(1996, 1, 2), dur!"days"(3)) ==
Interval!Date(Date(1996, 1, 2), Date(1996, 1, 5)));
Authors
License
Copyright © 1999-2018 by the D Language Foundation | Page generated by ddox.