1 #import "TestDateFormatterStringRepWithInterval.h"
2 #import <AIUtilities/AICalendarDateAdditions.h>
3 #import <AIUtilities/AIDateFormatterAdditions.h>
5 @implementation TestDateFormatterStringRepWithInterval
7 //Note: All of these delta values that we pass to NSCalendarDate need to be NEGATIVE, because we're looking to get a string representation of the interval since some time in the past.
8 - (void)testDateFormatterStringRepWithInterval_seconds {
9 NSCalendarDate *now = [NSCalendarDate calendarDate];
10 NSCalendarDate *date = [now
17 date = [date dateByMatchingDSTOfDate:now];
18 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date], @"10 seconds", @"Unexpected string for time interval");
20 - (void)testDateFormatterStringRepWithInterval_minutes {
21 NSCalendarDate *now = [NSCalendarDate calendarDate];
22 NSCalendarDate *date = [now
29 date = [date dateByMatchingDSTOfDate:now];
30 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date], @"10 minutes", @"Unexpected string for time interval");
32 - (void)testDateFormatterStringRepWithInterval_minutesSeconds {
33 NSCalendarDate *now = [NSCalendarDate calendarDate];
34 NSCalendarDate *date = [now
41 date = [date dateByMatchingDSTOfDate:now];
42 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date], @"10 minutes 10 seconds", @"Unexpected string for time interval");
44 - (void)testDateFormatterStringRepWithInterval_hours {
45 NSCalendarDate *now = [NSCalendarDate calendarDate];
46 NSCalendarDate *date = [now
53 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date], @"10 hours", @"Unexpected string for time interval");
55 - (void)testDateFormatterStringRepWithInterval_hoursSeconds {
56 NSCalendarDate *now = [NSCalendarDate calendarDate];
57 NSCalendarDate *date = [now
64 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date], @"10 hours 10 seconds", @"Unexpected string for time interval");
66 - (void)testDateFormatterStringRepWithInterval_hoursMinutes {
67 NSCalendarDate *now = [NSCalendarDate calendarDate];
68 NSCalendarDate *date = [now
75 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date], @"10 hours 10 minutes", @"Unexpected string for time interval");
77 - (void)testDateFormatterStringRepWithInterval_hoursMinutesSeconds {
78 NSCalendarDate *now = [NSCalendarDate calendarDate];
79 NSCalendarDate *date = [now
86 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date], @"10 hours 10 minutes 10 seconds", @"Unexpected string for time interval");
88 - (void)testDateFormatterStringRepWithInterval_days {
89 NSCalendarDate *now = [NSCalendarDate calendarDate];
90 NSCalendarDate *date = [now
97 date = [date dateByMatchingDSTOfDate:now];
98 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date], @"5 days", @"Unexpected string for time interval");
100 - (void)testDateFormatterStringRepWithInterval_daysSeconds {
101 NSCalendarDate *now = [NSCalendarDate calendarDate];
102 NSCalendarDate *date = [now
109 date = [date dateByMatchingDSTOfDate:now];
110 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date], @"5 days 10 seconds", @"Unexpected string for time interval");
112 - (void)testDateFormatterStringRepWithInterval_daysMinutes {
113 NSCalendarDate *now = [NSCalendarDate calendarDate];
114 NSCalendarDate *date = [now
121 date = [date dateByMatchingDSTOfDate:now];
122 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date], @"5 days 10 minutes", @"Unexpected string for time interval");
124 - (void)testDateFormatterStringRepWithInterval_daysMinutesSeconds {
125 NSCalendarDate *now = [NSCalendarDate calendarDate];
126 NSCalendarDate *date = [now
133 date = [date dateByMatchingDSTOfDate:now];
134 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date], @"5 days 10 minutes 10 seconds", @"Unexpected string for time interval");
136 - (void)testDateFormatterStringRepWithInterval_daysHours {
137 NSCalendarDate *now = [NSCalendarDate calendarDate];
138 NSCalendarDate *date = [now
145 date = [date dateByMatchingDSTOfDate:now];
146 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date], @"5 days 10 hours", @"Unexpected string for time interval");
148 - (void)testDateFormatterStringRepWithInterval_daysHoursSeconds {
149 NSCalendarDate *now = [NSCalendarDate calendarDate];
150 NSCalendarDate *date = [now
157 date = [date dateByMatchingDSTOfDate:now];
158 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date], @"5 days 10 hours 10 seconds", @"Unexpected string for time interval");
160 - (void)testDateFormatterStringRepWithInterval_daysHoursMinutes {
161 NSCalendarDate *now = [NSCalendarDate calendarDate];
162 NSCalendarDate *date = [now
169 date = [date dateByMatchingDSTOfDate:now];
170 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date], @"5 days 10 hours 10 minutes", @"Unexpected string for time interval");
172 - (void)testDateFormatterStringRepWithInterval_daysHoursMinutesSeconds {
173 NSCalendarDate *now = [NSCalendarDate calendarDate];
174 NSCalendarDate *date = [now
181 date = [date dateByMatchingDSTOfDate:now];
182 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date], @"5 days 10 hours 10 minutes 10 seconds", @"Unexpected string for time interval");
184 - (void)testDateFormatterStringRepWithInterval_weeks {
185 NSCalendarDate *now = [NSCalendarDate calendarDate];
186 NSCalendarDate *date = [now
193 date = [date dateByMatchingDSTOfDate:now];
194 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date], @"5 weeks", @"Unexpected string for time interval");
196 - (void)testDateFormatterStringRepWithInterval_weeksSeconds {
197 NSCalendarDate *now = [NSCalendarDate calendarDate];
198 NSCalendarDate *date = [now
205 date = [date dateByMatchingDSTOfDate:now];
206 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date], @"5 weeks 10 seconds", @"Unexpected string for time interval");
208 - (void)testDateFormatterStringRepWithInterval_weeksMinutes {
209 NSCalendarDate *now = [NSCalendarDate calendarDate];
210 NSCalendarDate *date = [now
217 date = [date dateByMatchingDSTOfDate:now];
218 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date], @"5 weeks 10 minutes", @"Unexpected string for time interval");
220 - (void)testDateFormatterStringRepWithInterval_weeksMinutesSeconds {
221 NSCalendarDate *now = [NSCalendarDate calendarDate];
222 NSCalendarDate *date = [now
229 date = [date dateByMatchingDSTOfDate:now];
230 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date], @"5 weeks 10 minutes 10 seconds", @"Unexpected string for time interval");
232 - (void)testDateFormatterStringRepWithInterval_weeksHours {
233 NSCalendarDate *now = [NSCalendarDate calendarDate];
234 NSCalendarDate *date = [now
241 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date], @"5 weeks 10 hours", @"Unexpected string for time interval");
243 - (void)testDateFormatterStringRepWithInterval_weeksHoursSeconds {
244 NSCalendarDate *now = [NSCalendarDate calendarDate];
245 NSCalendarDate *date = [now
252 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date], @"5 weeks 10 hours 10 seconds", @"Unexpected string for time interval");
254 - (void)testDateFormatterStringRepWithInterval_weeksHoursMinutes {
255 NSCalendarDate *now = [NSCalendarDate calendarDate];
256 NSCalendarDate *date = [now
263 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date], @"5 weeks 10 hours 10 minutes", @"Unexpected string for time interval");
265 - (void)testDateFormatterStringRepWithInterval_weeksHoursMinutesSeconds {
266 NSCalendarDate *now = [NSCalendarDate calendarDate];
267 NSCalendarDate *date = [now
274 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date], @"5 weeks 10 hours 10 minutes 10 seconds", @"Unexpected string for time interval");
276 - (void)testDateFormatterStringRepWithInterval_weeksDays {
277 NSCalendarDate *now = [NSCalendarDate calendarDate];
278 NSCalendarDate *date = [now
285 date = [date dateByMatchingDSTOfDate:now];
286 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date], @"5 weeks 5 days", @"Unexpected string for time interval");
288 - (void)testDateFormatterStringRepWithInterval_weeksDaysSeconds {
289 NSCalendarDate *now = [NSCalendarDate calendarDate];
290 NSCalendarDate *date = [now
297 date = [date dateByMatchingDSTOfDate:now];
298 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date], @"5 weeks 5 days 10 seconds", @"Unexpected string for time interval");
300 - (void)testDateFormatterStringRepWithInterval_weeksDaysMinutes {
301 NSCalendarDate *now = [NSCalendarDate calendarDate];
302 NSCalendarDate *date = [now
309 date = [date dateByMatchingDSTOfDate:now];
310 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date], @"5 weeks 5 days 10 minutes", @"Unexpected string for time interval");
312 - (void)testDateFormatterStringRepWithInterval_weeksDaysMinutesSeconds {
313 NSCalendarDate *now = [NSCalendarDate calendarDate];
314 NSCalendarDate *date = [now
321 date = [date dateByMatchingDSTOfDate:now];
322 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date], @"5 weeks 5 days 10 minutes 10 seconds", @"Unexpected string for time interval");
324 - (void)testDateFormatterStringRepWithInterval_weeksDaysHours {
325 NSCalendarDate *now = [NSCalendarDate calendarDate];
326 NSCalendarDate *date = [now
333 date = [date dateByMatchingDSTOfDate:now];
334 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date], @"5 weeks 5 days 10 hours", @"Unexpected string for time interval");
336 - (void)testDateFormatterStringRepWithInterval_weeksDaysHoursSeconds {
337 NSCalendarDate *now = [NSCalendarDate calendarDate];
338 NSCalendarDate *date = [now
345 date = [date dateByMatchingDSTOfDate:now];
346 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date], @"5 weeks 5 days 10 hours 10 seconds", @"Unexpected string for time interval");
348 - (void)testDateFormatterStringRepWithInterval_weeksDaysHoursMinutes {
349 NSCalendarDate *now = [NSCalendarDate calendarDate];
350 NSCalendarDate *date = [now
357 date = [date dateByMatchingDSTOfDate:now];
358 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date], @"5 weeks 5 days 10 hours 10 minutes", @"Unexpected string for time interval");
360 - (void)testDateFormatterStringRepWithInterval_weeksDaysHoursMinutesSeconds {
361 NSCalendarDate *now = [NSCalendarDate calendarDate];
362 NSCalendarDate *date = [now
369 date = [date dateByMatchingDSTOfDate:now];
370 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date], @"5 weeks 5 days 10 hours 10 minutes 10 seconds", @"Unexpected string for time interval");
373 - (void)testDateFormatterStringRepWithInterval_seconds_abbreviated {
374 NSCalendarDate *now = [NSCalendarDate calendarDate];
375 NSCalendarDate *date = [now
382 date = [date dateByMatchingDSTOfDate:now];
383 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date showingSeconds:YES abbreviated:YES], @"10s", @"Unexpected string for time interval");
385 - (void)testDateFormatterStringRepWithInterval_minutes_abbreviated {
386 NSCalendarDate *now = [NSCalendarDate calendarDate];
387 NSCalendarDate *date = [now
394 date = [date dateByMatchingDSTOfDate:now];
395 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date showingSeconds:YES abbreviated:YES], @"10m", @"Unexpected string for time interval");
397 - (void)testDateFormatterStringRepWithInterval_minutesSeconds_abbreviated {
398 NSCalendarDate *now = [NSCalendarDate calendarDate];
399 NSCalendarDate *date = [now
406 date = [date dateByMatchingDSTOfDate:now];
407 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date showingSeconds:YES abbreviated:YES], @"10m 10s", @"Unexpected string for time interval");
409 - (void)testDateFormatterStringRepWithInterval_hours_abbreviated {
410 NSCalendarDate *now = [NSCalendarDate calendarDate];
411 NSCalendarDate *date = [now
418 date = [date dateByMatchingDSTOfDate:now];
419 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date showingSeconds:YES abbreviated:YES], @"10h", @"Unexpected string for time interval");
421 - (void)testDateFormatterStringRepWithInterval_hoursSeconds_abbreviated {
422 NSCalendarDate *now = [NSCalendarDate calendarDate];
423 NSCalendarDate *date = [now
430 date = [date dateByMatchingDSTOfDate:now];
431 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date showingSeconds:YES abbreviated:YES], @"10h 10s", @"Unexpected string for time interval");
433 - (void)testDateFormatterStringRepWithInterval_hoursMinutes_abbreviated {
434 NSCalendarDate *now = [NSCalendarDate calendarDate];
435 NSCalendarDate *date = [now
442 date = [date dateByMatchingDSTOfDate:now];
443 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date showingSeconds:YES abbreviated:YES], @"10h 10m", @"Unexpected string for time interval");
445 - (void)testDateFormatterStringRepWithInterval_hoursMinutesSeconds_abbreviated {
446 NSCalendarDate *now = [NSCalendarDate calendarDate];
447 NSCalendarDate *date = [now
454 date = [date dateByMatchingDSTOfDate:now];
455 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date showingSeconds:YES abbreviated:YES], @"10h 10m 10s", @"Unexpected string for time interval");
457 - (void)testDateFormatterStringRepWithInterval_days_abbreviated {
458 NSCalendarDate *now = [NSCalendarDate calendarDate];
459 NSCalendarDate *date = [now
466 date = [date dateByMatchingDSTOfDate:now];
467 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date showingSeconds:YES abbreviated:YES], @"5d", @"Unexpected string for time interval");
469 - (void)testDateFormatterStringRepWithInterval_daysSeconds_abbreviated {
470 NSCalendarDate *now = [NSCalendarDate calendarDate];
471 NSCalendarDate *date = [now
478 date = [date dateByMatchingDSTOfDate:now];
479 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date showingSeconds:YES abbreviated:YES], @"5d 10s", @"Unexpected string for time interval");
481 - (void)testDateFormatterStringRepWithInterval_daysMinutes_abbreviated {
482 NSCalendarDate *now = [NSCalendarDate calendarDate];
483 NSCalendarDate *date = [now
490 date = [date dateByMatchingDSTOfDate:now];
491 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date showingSeconds:YES abbreviated:YES], @"5d 10m", @"Unexpected string for time interval");
493 - (void)testDateFormatterStringRepWithInterval_daysMinutesSeconds_abbreviated {
494 NSCalendarDate *now = [NSCalendarDate calendarDate];
495 NSCalendarDate *date = [now
502 date = [date dateByMatchingDSTOfDate:now];
503 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date showingSeconds:YES abbreviated:YES], @"5d 10m 10s", @"Unexpected string for time interval");
505 - (void)testDateFormatterStringRepWithInterval_daysHours_abbreviated {
506 NSCalendarDate *now = [NSCalendarDate calendarDate];
507 NSCalendarDate *date = [now
514 date = [date dateByMatchingDSTOfDate:now];
515 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date showingSeconds:YES abbreviated:YES], @"5d 10h", @"Unexpected string for time interval");
517 - (void)testDateFormatterStringRepWithInterval_daysHoursSeconds_abbreviated {
518 NSCalendarDate *now = [NSCalendarDate calendarDate];
519 NSCalendarDate *date = [now
526 date = [date dateByMatchingDSTOfDate:now];
527 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date showingSeconds:YES abbreviated:YES], @"5d 10h 10s", @"Unexpected string for time interval");
529 - (void)testDateFormatterStringRepWithInterval_daysHoursMinutes_abbreviated {
530 NSCalendarDate *now = [NSCalendarDate calendarDate];
531 NSCalendarDate *date = [now
538 date = [date dateByMatchingDSTOfDate:now];
539 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date showingSeconds:YES abbreviated:YES], @"5d 10h 10m", @"Unexpected string for time interval");
541 - (void)testDateFormatterStringRepWithInterval_daysHoursMinutesSeconds_abbreviated {
542 NSCalendarDate *now = [NSCalendarDate calendarDate];
543 NSCalendarDate *date = [now
550 date = [date dateByMatchingDSTOfDate:now];
551 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date showingSeconds:YES abbreviated:YES], @"5d 10h 10m 10s", @"Unexpected string for time interval");
553 - (void)testDateFormatterStringRepWithInterval_weeks_abbreviated {
554 NSCalendarDate *now = [NSCalendarDate calendarDate];
555 NSCalendarDate *date = [now
562 date = [date dateByMatchingDSTOfDate:now];
563 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date showingSeconds:YES abbreviated:YES], @"5w", @"Unexpected string for time interval");
565 - (void)testDateFormatterStringRepWithInterval_weeksSeconds_abbreviated {
566 NSCalendarDate *now = [NSCalendarDate calendarDate];
567 NSCalendarDate *date = [now
574 date = [date dateByMatchingDSTOfDate:now];
575 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date showingSeconds:YES abbreviated:YES], @"5w 10s", @"Unexpected string for time interval");
577 - (void)testDateFormatterStringRepWithInterval_weeksMinutes_abbreviated {
578 NSCalendarDate *now = [NSCalendarDate calendarDate];
579 NSCalendarDate *date = [now
586 date = [date dateByMatchingDSTOfDate:now];
587 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date showingSeconds:YES abbreviated:YES], @"5w 10m", @"Unexpected string for time interval");
589 - (void)testDateFormatterStringRepWithInterval_weeksMinutesSeconds_abbreviated {
590 NSCalendarDate *now = [NSCalendarDate calendarDate];
591 NSCalendarDate *date = [now
598 date = [date dateByMatchingDSTOfDate:now];
599 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date showingSeconds:YES abbreviated:YES], @"5w 10m 10s", @"Unexpected string for time interval");
601 - (void)testDateFormatterStringRepWithInterval_weeksHours_abbreviated {
602 NSCalendarDate *now = [NSCalendarDate calendarDate];
603 NSCalendarDate *date = [now
610 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date showingSeconds:YES abbreviated:YES], @"5w 10h", @"Unexpected string for time interval");
612 - (void)testDateFormatterStringRepWithInterval_weeksHoursSeconds_abbreviated {
613 NSCalendarDate *now = [NSCalendarDate calendarDate];
614 NSCalendarDate *date = [now
621 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date showingSeconds:YES abbreviated:YES], @"5w 10h 10s", @"Unexpected string for time interval");
623 - (void)testDateFormatterStringRepWithInterval_weeksHoursMinutes_abbreviated {
624 NSCalendarDate *now = [NSCalendarDate calendarDate];
625 NSCalendarDate *date = [now
632 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date showingSeconds:YES abbreviated:YES], @"5w 10h 10m", @"Unexpected string for time interval");
634 - (void)testDateFormatterStringRepWithInterval_weeksHoursMinutesSeconds_abbreviated {
635 NSCalendarDate *now = [NSCalendarDate calendarDate];
636 NSCalendarDate *date = [now
643 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date showingSeconds:YES abbreviated:YES], @"5w 10h 10m 10s", @"Unexpected string for time interval");
645 - (void)testDateFormatterStringRepWithInterval_weeksDays_abbreviated {
646 NSCalendarDate *now = [NSCalendarDate calendarDate];
647 NSCalendarDate *date = [now
654 date = [date dateByMatchingDSTOfDate:now];
655 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date showingSeconds:YES abbreviated:YES], @"5w 5d", @"Unexpected string for time interval");
657 - (void)testDateFormatterStringRepWithInterval_weeksDaysSeconds_abbreviated {
658 NSCalendarDate *now = [NSCalendarDate calendarDate];
659 NSCalendarDate *date = [now
666 date = [date dateByMatchingDSTOfDate:now];
667 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date showingSeconds:YES abbreviated:YES], @"5w 5d 10s", @"Unexpected string for time interval");
669 - (void)testDateFormatterStringRepWithInterval_weeksDaysMinutes_abbreviated {
670 NSCalendarDate *now = [NSCalendarDate calendarDate];
671 NSCalendarDate *date = [now
678 date = [date dateByMatchingDSTOfDate:now];
679 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date showingSeconds:YES abbreviated:YES], @"5w 5d 10m", @"Unexpected string for time interval");
681 - (void)testDateFormatterStringRepWithInterval_weeksDaysMinutesSeconds_abbreviated {
682 NSCalendarDate *now = [NSCalendarDate calendarDate];
683 NSCalendarDate *date = [now
690 date = [date dateByMatchingDSTOfDate:now];
691 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date showingSeconds:YES abbreviated:YES], @"5w 5d 10m 10s", @"Unexpected string for time interval");
693 - (void)testDateFormatterStringRepWithInterval_weeksDaysHours_abbreviated {
694 NSCalendarDate *now = [NSCalendarDate calendarDate];
695 NSCalendarDate *date = [now
702 date = [date dateByMatchingDSTOfDate:now];
703 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date showingSeconds:YES abbreviated:YES], @"5w 5d 10h", @"Unexpected string for time interval");
705 - (void)testDateFormatterStringRepWithInterval_weeksDaysHoursSeconds_abbreviated {
706 NSCalendarDate *now = [NSCalendarDate calendarDate];
707 NSCalendarDate *date = [now
714 date = [date dateByMatchingDSTOfDate:now];
715 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date showingSeconds:YES abbreviated:YES], @"5w 5d 10h 10s", @"Unexpected string for time interval");
717 - (void)testDateFormatterStringRepWithInterval_weeksDaysHoursMinutes_abbreviated {
718 NSCalendarDate *now = [NSCalendarDate calendarDate];
719 NSCalendarDate *date = [now
726 date = [date dateByMatchingDSTOfDate:now];
727 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date showingSeconds:YES abbreviated:YES], @"5w 5d 10h 10m", @"Unexpected string for time interval");
729 - (void)testDateFormatterStringRepWithInterval_weeksDaysHoursMinutesSeconds_abbreviated {
730 NSCalendarDate *now = [NSCalendarDate calendarDate];
731 NSCalendarDate *date = [now
738 date = [date dateByMatchingDSTOfDate:now];
739 AISimplifiedAssertEqualObjects([NSDateFormatter stringForTimeIntervalSinceDate:date showingSeconds:YES abbreviated:YES], @"5w 5d 10h 10m 10s", @"Unexpected string for time interval");