This class tries to find the best display format for a date range.
More...
#import <INDateRangeFormatter.h>
Inherits UIViewController.
This class tries to find the best display format for a date range.
| - (NSString *) formattedRange |
|
|
|
Calls "formattedRangeForMaxWith:withFont:" with a width of CGFLOAT_MAX and no font.
| - (NSString *) formattedRangeForLabel: |
|
(UILabel *) |
aLabel |
|
Calls "formattedRangeForMaxWidth:withFont:" with the label's bounds and font.
| - (NSString *) formattedRangeForMaxWidth: |
|
(CGFloat) |
maxWidth |
| withFont: |
|
(UIFont *) |
aFont |
|
|
| |
Formats the date range according to the given dates and tries to find the optimal format to fit into the given width.
- Parameters
-
| maxWidth | The maximum width the string should have, not guaranteed that the requirement will be met. |
| aFont | The font to be used to determine whether the string fits or not. |
- Returns
- A formatted string representing the date range
| + (id) rangeFormatterFrom: |
|
(NSDate *) |
fromDate |
| to: |
|
(NSDate *) |
toDate |
|
|
| |
The range start date, may be nil.
Defaults to current locale.
| - (NSString *) sinceString |
|
readwritenonatomiccopy |
Defaults to "Since", used if no "to" date is given.
The range end date, may be nil.
| - (NSString *) untilString |
|
readwritenonatomiccopy |
Defaults to "Until", used if no "from" date is given.
The documentation for this class was generated from the following files:
- IndivoFramework/Classes/INDateRangeFormatter.h
- IndivoFramework/Classes/INDateRangeFormatter.m