You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Returns the seconds between `self` and `date` or `nil` if there is no difference in time between them.
153
+
154
+
For example, given this interval and a this date on a timeline:
155
+
```
156
+
|-----| <-- time interval --> *
157
+
```
158
+
Returns a postive time interval when `date` is a moment greater than or equal to (after or exactly) the end of `self`.
159
+
160
+
```
161
+
* <-- time interval --> |-----|
162
+
```
163
+
Returns a negative time interval when `date` is a moment less than or equal to (before or exactly) the start of `self`.
164
+
165
+
A return value of `0` indicates `date` is equal to either the start or end moments of `self`.
166
+
167
+
A return value of `nil` indicates the `date` is between the start and end dates (`date` is both greater than the start and less than the end moments of `self`):
Returns the date interval between `self` and `date` or `nil` if there is no difference in time between them.
184
+
185
+
For example, given this interval and a this date on a timeline:
186
+
```
187
+
* <-- time interval --> |-----|
188
+
```
189
+
Returns a value whose start is `date` and whose `duration` is the time between the `date` and the end of `self`.
190
+
191
+
```
192
+
|-----| <-- time interval --> *
193
+
```
194
+
Returns a value whose start is the end of `self` and whose `duration` is the time between the `date` and the the end of `self`.
195
+
196
+
A return value with a duration of `0` indicates `date` is equal to the start or end of `self`.
197
+
198
+
A return value of `nil` indicates there are no moments between `date` and `self` (`date` is both greater than the start and less than the end moments of `self`):
Returns the seconds between `self` and `dateInterval` or `nil` if there is no difference in time between them.
217
+
218
+
For example, given these two intervals on a timeline:
219
+
```
220
+
|-----| <-- time interval --> |-----|
221
+
```
222
+
Returns a negative time interval when `self` ends before `dateInterval` starts. A postive time interval indicates `self` starts after `dateInterval` ends.
223
+
224
+
A return value of `0` indicates `self` starts or ends where `dateInterval` ends or starts (in other words, they intersect at their opposing start/end moments):
225
+
```
226
+
|-----|-----|
227
+
```
228
+
229
+
A return value of `nil` indicates `self` and `dateInterval` do not have any time between them:
Returns the date interval between `self` and `dateInterval` or `nil` if there is no difference in time between them.
248
+
249
+
For example, given these two intervals on a timeline:
250
+
```
251
+
|-----| <-- time interval --> |-----|
252
+
```
253
+
The latest start date and the earliest end date between `self` and `dateInterval` is determined. Returns a date interval whose start is the earliest end date and whose duration is the difference in time between the latest start and earliest end.
254
+
255
+
A return value with a duration of `0` indicates `self` and `dateInterval` form an unbroken, continous interval (in other words, they intersect at opposing starts/ends):
256
+
```
257
+
|-----|-----|
258
+
```
259
+
260
+
A return value of `nil` indicates that no interval exists between `self` and `dateInterval`:
0 commit comments