ESHalfYearFormatter Class Reference
Inherits from | NSObject |
Declared in | ESHalfYearFormatter.h ESHalfYearFormatter.m |
Overview
A class to format first and second half year strings separately. This is the case for the Japanese language.
H1 ‘14 ===> @“2014 年 上半期”
H2 ‘14 ===> @“2014 年 下半期”
Properties
firstHalfFormat
A value passed in the constructor.
@property (nonatomic, readonly) NSString *firstHalfFormat
Discussion
First half year format string. For example,
- @“%@ 年 上半期”
- @“H1 ‘%@”
Declared In
ESHalfYearFormatter.h
Instance Methods
init
Unsupported initializer. Throws an exception.
- (instancetype)init
Return Value
nil if asserts are disabled.
Declared In
ESHalfYearFormatter.h
initWithFirstHalfFormat:secondHalfFormat:shouldTruncateYear:
A designated initializer.
- (instancetype)initWithFirstHalfFormat:(NSString *)firstHalfFormat secondHalfFormat:(NSString *)secondHalfFormat shouldTruncateYear:(BOOL)isShortYear
Parameters
- firstHalfFormat
First half year format string. For example,
- @“%@ 年 上半期”
- @“H1 ‘%@”
- secondHalfFormat
Second half year format string. For example,
- @“%@ 年 下半期”
- @“H2 ‘%@”
- isShortYear
YES for two digit year. NO for four digit year.
Return Value
A properly initialized ESHalfYearFormatter object.
Declared In
ESHalfYearFormatter.h