Re: Add property setting to chain

2017-07-16 Thread closescreen via Digitalmars-d-learn
Thanks for reply, Ali.

Re: Add property setting to chain

2017-07-15 Thread Ali Çehreli via Digitalmars-d-learn
On 07/15/2017 12:53 PM, closescreen wrote: Let i have code: Clock.currTime.to!DateTime.Interval!DateTime( 24.hours ).fwdRange( h=>h+1.hours ).writeln; Now if i want to set the minute=0 and second=0 without breaking chain, what i should do? I think about somewhat like: with(

Re: Add property setting to chain

2017-07-15 Thread closescreen via Digitalmars-d-learn
I found this solution: Clock.currTime.to!DateTime.pipe!( dt=>(dt.minute=0,dt.second=0, dt) ).Interval!DateTime( 24.hours ).fwdRange( h=>h+1.hours ).writeln; Or: Clock.currTime.to!DateTime.pipe!( "a.minute=0, a.second=0, a" ).Interval!DateTime( 24.hours ).fwdRange( h=>h+1.hours ).writeln;

Add property setting to chain

2017-07-15 Thread closescreen via Digitalmars-d-learn
Let i have code: Clock.currTime.to!DateTime.Interval!DateTime( 24.hours ).fwdRange( h=>h+1.hours ).writeln; Now if i want to set the minute=0 and second=0 without breaking chain, what i should do? I think about somewhat like: with( Clock.currTime.to!DateTime){ minute=0; second=0