Joutsen  v0.4.1
Static Public Member Functions | List of all members
Joutsen.System.DateTimeExtensions Class Reference

A static class containing extensions for the System.DateTime class. More...

Static Public Member Functions

static String ToIso8601LongDateTimeString (this DateTime dateTime)
 Creates a date and time string that conforms to ISO 8601. More...
 

Detailed Description

A static class containing extensions for the System.DateTime class.

Since
0.2.0

Member Function Documentation

◆ ToIso8601LongDateTimeString()

static String Joutsen.System.DateTimeExtensions.ToIso8601LongDateTimeString ( this DateTime  dateTime)
static

Creates a date and time string that conforms to ISO 8601.

Parameters
dateTimethe System.DateTime object to convert
Returns
a string representation of the dateTime in the format YYYY-MM-DDThh:mm:sszzz
Remarks
the method takes the System.DateTimeKind of the dateTime into account to return the appropriate timezone offset.