Inherits from NSObject
Conforms to ESHalfYearLocalizer
Declared in ESHalfYearLocalizerPOD.h
ESHalfYearLocalizerPOD.m

Overview

A plain old data structure that implements the ESHalfYearLocalizer protocol.

Properties

formatForFirstHalfYear

A value passed in the constructor.

@property (nonatomic, readonly) NSString *formatForFirstHalfYear

Discussion

First half year format string. For example,

  • @“%@ 年 上半期”
  • @“H1 ‘%@”

Declared In

ESHalfYearLocalizerPOD.h

formatForSecondHalfYear

A value passed in the constructor.

@property (nonatomic, readonly) NSString *formatForSecondHalfYear

Discussion

Second half year format string. For example,

  • @“%@ 年 下半期”
  • @“H2 ‘%@”

Declared In

ESHalfYearLocalizerPOD.h

shouldTruncateYear

A boolean representation of the [ESHalfYearLocalizerPOD yearTruncationMode]. Throws an exception for the invalid format.

@property (nonatomic, readonly) BOOL shouldTruncateYear

Declared In

ESHalfYearLocalizerPOD.h

yearTruncationMode

An identifier from the SQL function. It chould be ‘short’ or ‘long’ Note : year mode is case insensitive

@property (nonatomic, readonly) NSString *yearTruncationMode

Declared In

ESHalfYearLocalizerPOD.h

Class Methods

longJapaneseLocalizer

A default Japanese formatter. Result example :

+ (instancetype)longJapaneseLocalizer

Return Value

A default Japanese formatter. Result example :

  • @“2014 年 下半期”
  • @“2014 年 下半期”

Declared In

ESHalfYearLocalizerPOD.h

shortEnglishLocalizer

A default english formatter Result example :

+ (instancetype)shortEnglishLocalizer

Return Value

A default english formatter Result example :

  • H1 ‘14
  • H2 ‘14

Declared In

ESHalfYearLocalizerPOD.h

Instance Methods

init

Unsupported initializer. Throws an exception.

- (instancetype)init

Return Value

nil if asserts are disabled.

Declared In

ESHalfYearLocalizerPOD.h

initWithFirstHalfFormat:secondHalfFormat:yearTruncationMode:

First half year format string. For example,

- (instancetype)initWithFirstHalfFormat:(NSString *)firstHalfFormat secondHalfFormat:(NSString *)secondHalfFormat yearTruncationMode:(NSString *)yearTruncationMode

Parameters

firstHalfFormat

First half year format string. For example,

  • @“%@ 年 上半期”
  • @“H1 ‘%@”
secondHalfFormat

Second half year format string. For example,

  • @“%@ 年 下半期”
  • @“H2 ‘%@”
yearTruncationMode

An identifier from the SQL function. It chould be ‘short’ or ‘long’ Note : year mode is case insensitive

Return Value

A properly initialized ESHalfYearLocalizerPOD object.

Declared In

ESHalfYearLocalizerPOD.h