SqlLocalizedDateFormatter Class Reference
Inherits from | NSObject |
Declared in | SqlLocalizedDateFormatter.h SqlLocalizedDateFormatter.m |
Overview
A class that ensures correct conversion of the ANSI date format to any given format. The locale is used to convert the target date.
This class implements the “command” pattern and caches its results.
Instance Methods
getFormattedDate
Returns a formatted date.
- (NSString *)getFormattedDate
Return Value
A string of a date in the given format. Note : If localeIdentifier_ is invalid then “nil” is returned.
Declared In
SqlLocalizedDateFormatter.h
initWithDate:format:locale:
Creates an instance of the formatter object and populates it with parameters for lazy evaluation.
- (id)initWithDate:(NSString *)strDate_ format:(NSString *)format_ locale:(NSString *)localeIdentifier_
Parameters
- strDate_
A date string in ANSI format : “yyyy-MM-dd”.
- format_
A target format
- localeIdentifier_
an identifier of the target locale for formatting. Note : The “en_US_POSIX” locale will be used to convert “strDate_” from NSString to NSDate
Return Value
SqlLocalizedDateFormatter instance.
Declared In
SqlLocalizedDateFormatter.h