MFDateFormatter Class Reference
| Inherits from | NSObject |
|---|---|
| Declared in | MFDateFormatter.h MFDateFormatter.m |
Overview
The MFDateFormatter is singleton class that contains functions to formatting NSDate into NSString or parsing NSString into NSDate for the Mesosfer framework.
+ sharedFormatter
Gets MFDateFormatter shared instance.
+ (nonnull instancetype)sharedFormatterReturn Value
Shared instance of MFDateFormatter.
Declared In
MFDateFormatter.h
– stringFromDate:
Converts NSDate into NSString representation using the following format: yyyy-MM-dd’T'HH:mm:ss.SSS'Z'
- (nonnull NSString *)stringFromDate:(nonnull NSDate *)dateParameters
date |
|
|---|
Return Value
Formatted NSString representation.
See Also
MFDateFormatter.- stringFromDate:isTimestamp:
Declared In
MFDateFormatter.h
– stringFromDate:isTimestamp:
Converts NSDate into NSString representation using the following format: yyyy-MM-dd or yyyy-MM-dd’T'HH:mm:ss.SSS'Z'
- (nonnull NSString *)stringFromDate:(nonnull NSDate *)date isTimestamp:(BOOL)flagParameters
date |
|
|---|---|
flag |
The flag to convert |
Return Value
Formatted NSString representation.
See Also
MFDateFormatter.- stringFromDate:
Declared In
MFDateFormatter.h
– dateFromString:
Converts NSString representation of a date into NSDate object.
- (nullable NSDate *)dateFromString:(nonnull NSString *)stringParameters
string |
|
|---|
Return Value
NSDate incapsulating the date.
Discussion
Following date formats are supported: yyyy-MM-dd yyyy-MM-dd HH:mm'Z' yyyy-MM-dd HH:mm:ss'Z' yyyy-MM-dd HH:mm:ss.SSS'Z' yyyy-MM-dd’T'HH:mm'Z' yyyy-MM-dd’T'HH:mm:ss'Z' yyyy-MM-dd’T'HH:mm:ss.SSS'Z'
Declared In
MFDateFormatter.h