Re: [swift-corelibs-dev] Suggested DateInterval API improvement

2016-06-21 Thread David Hart via swift-corelibs-dev
I vote for (2). Thats what I would have expected. `start` changing from under you is weird. > On 21 Jun 2016, at 18:44, Tony Parker via swift-corelibs-dev > wrote: > > Hi Greg, > >> On Jun 20, 2016, at 9:04 PM, Greg Titus > > wrote: >> >> One domain where this happ

Re: [swift-corelibs-dev] Suggested DateInterval API improvement

2016-06-21 Thread Greg Titus via swift-corelibs-dev
> On Jun 21, 2016, at 9:44 AM, Tony Parker wrote: > > Hi Greg, > >> On Jun 20, 2016, at 9:04 PM, Greg Titus wrote: >> >> One domain where this happens is project planning back from a fixed end >> date. The most well-known of these would be rocket launches: “T minus 10 >> seconds” is exactly

Re: [swift-corelibs-dev] Suggested DateInterval API improvement

2016-06-21 Thread Tony Parker via swift-corelibs-dev
Hi Greg, > On Jun 20, 2016, at 9:04 PM, Greg Titus wrote: > > One domain where this happens is project planning back from a fixed end date. > The most well-known of these would be rocket launches: “T minus 10 seconds” > is exactly a negative time interval from an end date. > That makes sense

Re: [swift-corelibs-dev] Suggested DateInterval API improvement

2016-06-20 Thread Greg Titus via swift-corelibs-dev
One domain where this happens is project planning back from a fixed end date. The most well-known of these would be rocket launches: “T minus 10 seconds” is exactly a negative time interval from an end date. That being said, it’s a fairly uncommon use case and I wouldn’t change the API to suppo

Re: [swift-corelibs-dev] Suggested DateInterval API improvement

2016-06-20 Thread Tony Parker via swift-corelibs-dev
Hi Dave, We had some extensive discussion about this ourselves, but we couldn’t come up with a compelling use case for a negative time interval. Can you describe how you wanted to use it? - Tony > On Jun 17, 2016, at 2:01 PM, Dave Lyon via swift-corelibs-dev > wrote: > > In attempting to us

[swift-corelibs-dev] Suggested DateInterval API improvement

2016-06-20 Thread Dave Lyon via swift-corelibs-dev
In attempting to use the new DateInterval value type to improve some existing code, I ran in to an issue where DateIntervals cannot be "reverse" intervals, which is contrary to how TimeInterval works, and somewhat confusing. I would propose that the DateInterval value type should be able to be pro