ESHalfYearLocalizer Protocol Reference
Conforms to | NSObject |
Declared in | ESHalfYearLocalizer.h |
Tasks
-
– formatForFirstHalfYear
required method -
– formatForSecondHalfYear
required method -
– yearTruncationMode
required method -
– shouldTruncateYear
required method
Instance Methods
formatForFirstHalfYear
Format for the first half of the year. Only year should be parametrized.
- (NSString *)formatForFirstHalfYear
Discussion
@“%@ 年 上半期” –> @“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.h
formatForSecondHalfYear
Format for the second half of the year. Only year should be parametrized.
- (NSString *)formatForSecondHalfYear
Discussion
@“%@ 年 下半期” –> @“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.h
shouldTruncateYear
A boolean value for [ESHalfYearLocalizer yearTruncationMode]
- (BOOL)shouldTruncateYear
Discussion
@return “YES” if [ESHalfYearLocalizer yearTruncationMode] is “short”. “NO” if [ESHalfYearLocalizer yearTruncationMode] is “long”.
Throws an exception for anything else.
Declared In
ESHalfYearLocalizer.h