ESHalfYearLocalizer Protocol Reference
| Conforms to | NSObject |
| Declared in | ESHalfYearLocalizer.h |
Tasks
-
– formatForFirstHalfYearrequired method -
– formatForSecondHalfYearrequired method -
– yearTruncationModerequired method -
– shouldTruncateYearrequired method
Instance Methods
formatForFirstHalfYear
Format for the first half of the year. Only year should be parametrized.
- (NSString *)formatForFirstHalfYearDiscussion
@“%@ 年 上半期” –> @“2014 年 上半期”
@“H1 ‘%@” –> @“H1 '14”
Symbols are not escaped. They should be escaped manually prior to using in sqlite queries.
A string constant is formed by enclosing the string in single quotes (‘). A single quote within the string can be encoded by putting two single quotes in a row - as in Pascal. C-style escapes using the backslash character are not supported because they are not standard SQL. https://www.sqlite.org/lang_expr.html
Declared In
ESHalfYearLocalizer.hformatForSecondHalfYear
Format for the second half of the year. Only year should be parametrized.
- (NSString *)formatForSecondHalfYearDiscussion
@“%@ 年 下半期” –> @“2014 年 下半期”
@“H2 ‘%@” –> @“H2 '14”
Symbols are not escaped. They should be escaped manually prior to using in sqlite queries.
A string constant is formed by enclosing the string in single quotes (‘). A single quote within the string can be encoded by putting two single quotes in a row - as in Pascal. C-style escapes using the backslash character are not supported because they are not standard SQL. https://www.sqlite.org/lang_expr.html
Declared In
ESHalfYearLocalizer.hshouldTruncateYear
A boolean value for [ESHalfYearLocalizer yearTruncationMode]
- (BOOL)shouldTruncateYearDiscussion
@return “YES” if [ESHalfYearLocalizer yearTruncationMode] is “short”. “NO” if [ESHalfYearLocalizer yearTruncationMode] is “long”.
Throws an exception for anything else.
Declared In
ESHalfYearLocalizer.h