これにどのようにアプローチするかに関係なく、2 つの文字列を取得して結合する必要があります。
要するに、最終的には 2 つの日付があります。
10:00 - 11:00AM Monday 25th March, 2013
^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Date1 Date2
2 つの個別NSDateFormatter
のオブジェクトを使用して、必要なものを提供できます。
NSDateFormatter *timeOnlyDateFormatter = [[NSDateFormatter alloc] init];
//... set the format for the timeOnlyDateFormatter here
NSDateFormatter *fullDateFormatter = [[NSDateFormatter alloc] init];
//.. set the format for the fullDateFormatter here
これにより、それらを使用して Date1 文字列と Date2 文字列の両方を作成し、それらを組み合わせることができます。
NSString *firstString = [timeOnlyDateFormatter stringFromDate:firstDate];
NSString *secondString = [fullDateFormatter stringFromDate:secondDate];
NSString *combined = [NSString stringWithFormat:@"%@ - %@", firstString, secondString];
私の知る限り、これを行うための本当にきれいな方法はありません。