View source code
Display the source code in std/datetime.d from which this page was generated on
github.
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.
Page wiki
View or edit the community-maintained wiki page associated with this page.
Template std.datetime.PosInfInterval.expand
Expands the interval backwards in time. Effectively, it does
.
begin
-= duration
Arguments
template expand(D);
Functions
Function name | Description |
---|---|
expand |
Parameters
Name | Description |
---|---|
duration | The duration to expand the interval by. |
Examples
auto interval1 = PosInfInterval!Date(Date(1996, 1, 2)); auto interval2 = PosInfInterval!Date(Date(1996, 1, 2)); interval1.expand(dur!"days"(2)); assert(interval1 == PosInfInterval!Date(Date(1995, 12, 31))); interval2.expand(dur!"days"(-2)); assert(interval2 == PosInfInterval!Date(Date(1996, 1, 4)));
Authors
Jonathan M Davis and Kato Shoichi