Differences From Artifact [da5cc3c73a]:
- File src/OFDate.m — part of check-in [d477b270f3] at 2012-10-28 12:37:11 on branch trunk — Fix wrong imports. (user: js, size: 13163) [annotate] [blame] [check-ins using] [more...]
To Artifact [6b0927552c]:
- File
src/OFDate.m
— part of check-in
[38dda0d1c7]
at
2012-11-23 23:57:35
on branch trunk
— Allow passing nil to -[earlierDate/laterDate:].
If the argument is nil, it will return the receiver. (user: js, size: 13287) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 | } return ret; } - (OFDate*)earlierDate: (OFDate*)otherDate { if ([self compare: otherDate] == OF_ORDERED_DESCENDING) return [[otherDate retain] autorelease]; return [[self retain] autorelease]; } - (OFDate*)laterDate: (OFDate*)otherDate { if ([self compare: otherDate] == OF_ORDERED_ASCENDING) return [[otherDate retain] autorelease]; return [[self retain] autorelease]; } - (double)timeIntervalSince1970 | > > > > > > | 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 | } return ret; } - (OFDate*)earlierDate: (OFDate*)otherDate { if (otherDate == nil) return [[self retain] autorelease]; if ([self compare: otherDate] == OF_ORDERED_DESCENDING) return [[otherDate retain] autorelease]; return [[self retain] autorelease]; } - (OFDate*)laterDate: (OFDate*)otherDate { if (otherDate == nil) return [[self retain] autorelease]; if ([self compare: otherDate] == OF_ORDERED_ASCENDING) return [[otherDate retain] autorelease]; return [[self retain] autorelease]; } - (double)timeIntervalSince1970 |
︙ | ︙ |