Conforms to NSObject
Declared in ESHalfYearLocalizer.h

Overview

A protocol to configure half year localization workflow.

Tasks

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

- (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

yearTruncationMode

Year truncation mode to use in SQL functions. The value is case insensitive.

- (NSString *)yearTruncationMode

Return Value

“short” or “long”.

Declared In

ESHalfYearLocalizer.h