MMPresentationFormatter Class Reference
Inherits from | NSObject |
Declared in | MMPresentationFormatter.h MMPresentationFormatter.m |
Class Methods
formatBusinessHoursForOpenTime:withCloseTime:
- Formats a merchant’s business hours in
+ (NSString *)formatBusinessHoursForOpenTime:(NSString *)openTime withCloseTime:(NSString *)closeTime
Discussion
- an appropriate format.
*
@param openTime The open-time of a merchant.
@param closeTime The close-time of a merchant.
*
@return A UI appropriate string that represents
a merchant's business hours.
Declared In
MMPresentationFormatter.h
formatDistance:
- Returns a string which represens a distance
+ (NSString *)formatDistance:(NSNumber *)distance
Discussion
in a UI appropriate format. If a distance
is under 1.0 km, the distance is formatted
in metres; if greater that or equal to 1.0 km,
the distance is formatted in kilometers.
*
- @param distance A distance
*
@return A UI formatted representation of
a distance.
Declared In
MMPresentationFormatter.h
formatNumberAsPrice:
- Provides a UI appropriate formatting
+ (NSString *)formatNumberAsPrice:(NSNumber *)price
Discussion
- for a model’s price.
*
- @param price A price.
*
@return A UI appropriate string that represents
a model's price.
Declared In
MMPresentationFormatter.h
formatRatingForRawRating:
- Takes a rating from an
MMMerchant
or
+ (NSString *)formatRatingForRawRating:(NSNumber *)rating
Discussion
MMMenuItem
and formats the number aswith 2 significant digits. A rating of
0 is formatted an ‘N/A’
*
- @param rating The rating from the model.
*
@return A string formatted representation of
the rating.
Declared In
MMPresentationFormatter.h