fm.liveswitch.Iso8601Timestamp Class Reference

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

Public Member Functions

 Iso8601Timestamp ()
 

Static Public Member Functions

static String dateTimeToIso8601 (java.util.Date dateTime)
 Converts a date to a ISO-8601 timestamp. More...
 
static String getUtcNow ()
 Gets the current UTC time in ISO-8601 format. More...
 
static java.util.Date iso8601ToDateTime (String iso8601)
 Converts a ISO-8601 timestamp to a date. More...
 

Detailed Description

Utility class to assist with ISO-8601 timestamp conversions.

Constructor & Destructor Documentation

◆ Iso8601Timestamp()

fm.liveswitch.Iso8601Timestamp.Iso8601Timestamp ( )

Member Function Documentation

◆ dateTimeToIso8601()

static String fm.liveswitch.Iso8601Timestamp.dateTimeToIso8601 ( java.util.Date  dateTime)
static

Converts a date to a ISO-8601 timestamp.

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

◆ getUtcNow()

static String fm.liveswitch.Iso8601Timestamp.getUtcNow ( )
static

Gets the current UTC time in ISO-8601 format.

◆ iso8601ToDateTime()

static java.util.Date fm.liveswitch.Iso8601Timestamp.iso8601ToDateTime ( String  iso8601)
static

Converts a ISO-8601 timestamp to a date.

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