561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
|
}
- (id)copy
{
return [self retain];
}
- (of_comparison_result_t)compare: (OFDate *)date
{
if (![date isKindOfClass: [OFDate class]])
@throw [OFInvalidArgumentException exception];
if (self.timeIntervalSince1970 < date.timeIntervalSince1970)
return OF_ORDERED_ASCENDING;
if (self.timeIntervalSince1970 > date.timeIntervalSince1970)
return OF_ORDERED_DESCENDING;
return OF_ORDERED_SAME;
}
- (OFString *)description
{
return [self dateStringWithFormat: @"%Y-%m-%dT%H:%M:%SZ"];
}
|
|
|
|
|
|
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
|
}
- (id)copy
{
return [self retain];
}
- (OFComparisonResult)compare: (OFDate *)date
{
if (![date isKindOfClass: [OFDate class]])
@throw [OFInvalidArgumentException exception];
if (self.timeIntervalSince1970 < date.timeIntervalSince1970)
return OFOrderedAscending;
if (self.timeIntervalSince1970 > date.timeIntervalSince1970)
return OFOrderedDescending;
return OFOrderedSame;
}
- (OFString *)description
{
return [self dateStringWithFormat: @"%Y-%m-%dT%H:%M:%SZ"];
}
|
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
|
}
- (OFDate *)earlierDate: (OFDate *)otherDate
{
if (otherDate == nil)
return self;
if ([self compare: otherDate] == OF_ORDERED_DESCENDING)
return otherDate;
return self;
}
- (OFDate *)laterDate: (OFDate *)otherDate
{
if (otherDate == nil)
return self;
if ([self compare: otherDate] == OF_ORDERED_ASCENDING)
return otherDate;
return self;
}
- (of_time_interval_t)timeIntervalSince1970
{
|
|
|
|
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
|
}
- (OFDate *)earlierDate: (OFDate *)otherDate
{
if (otherDate == nil)
return self;
if ([self compare: otherDate] == OFOrderedDescending)
return otherDate;
return self;
}
- (OFDate *)laterDate: (OFDate *)otherDate
{
if (otherDate == nil)
return self;
if ([self compare: otherDate] == OFOrderedAscending)
return otherDate;
return self;
}
- (of_time_interval_t)timeIntervalSince1970
{
|