FMLiveSwitchIso8601Timestamp Class Reference

Utility class to assist with ISO-8601 timestamp conversions. More...

Instance Methods

(instancetype) - init
 

Class Methods

(NSString *) + dateTimeToIso8601WithDateTime:
 Converts a date to a ISO-8601 timestamp. More...
 
(FMLiveSwitchIso8601Timestamp *) + iso8601Timestamp
 
(NSDate *) + iso8601ToDateTimeWithIso8601:
 Converts a ISO-8601 timestamp to a date. More...
 
(NSString *) + utcNow
 Gets the current UTC time in ISO-8601 format. More...
 

Detailed Description

Utility class to assist with ISO-8601 timestamp conversions.

Method Documentation

◆ dateTimeToIso8601WithDateTime:

+ (NSString*) dateTimeToIso8601WithDateTime: (NSDate *)  dateTime

Converts a date to a ISO-8601 timestamp.

Parameters
dateTimeThe date to convert.
Returns
The equivalent ISO-8601 timestamp.

◆ init

- (instancetype) init

◆ iso8601Timestamp

+ (FMLiveSwitchIso8601Timestamp*) iso8601Timestamp

◆ iso8601ToDateTimeWithIso8601:

+ (NSDate*) iso8601ToDateTimeWithIso8601: (NSString *)  iso8601

Converts a ISO-8601 timestamp to a date.

Parameters
iso8601The ISO-8601 timestamp to convert.
Returns
The equivalent date.

◆ utcNow

+ (NSString*) utcNow

Gets the current UTC time in ISO-8601 format.