C# Class Disco.DateTimeExtensions

Show file Open project: garysharp/Disco

Public Methods

Method Description
From ( this moment, System.DateTime to ) : string
From ( this moment, System.DateTime to, bool withoutSuffix ) : string
From ( this moment, System.DateTime to, bool withoutSuffix, string nullValue ) : string
From ( this moment, System.DateTime to, string nullValue ) : string
FromNow ( this moment ) : string
FromNow ( this moment, bool withoutSuffix ) : string
FromNow ( this moment, bool withoutSuffix, string nullValue ) : string
FromNow ( this moment, string nullValue ) : string
Humanize ( this duration, bool withSuffix ) : string
ToFullDateTime ( this d ) : string
ToFullDateTime ( this d, string NullValue = "N/A" ) : string
ToISO8601 ( this d ) : string
ToUnixEpoc ( this d ) : long
ToUnixEpoc ( this d ) : long?

Private Methods

Method Description
RelativeTime ( this difference, bool withoutSuffix ) : string

Method Details

From() public static method

public static From ( this moment, System.DateTime to ) : string
moment this
to System.DateTime
return string

From() public static method

public static From ( this moment, System.DateTime to, bool withoutSuffix ) : string
moment this
to System.DateTime
withoutSuffix bool
return string

From() public static method

public static From ( this moment, System.DateTime to, bool withoutSuffix, string nullValue ) : string
moment this
to System.DateTime
withoutSuffix bool
nullValue string
return string

From() public static method

public static From ( this moment, System.DateTime to, string nullValue ) : string
moment this
to System.DateTime
nullValue string
return string

FromNow() public static method

public static FromNow ( this moment ) : string
moment this
return string

FromNow() public static method

public static FromNow ( this moment, bool withoutSuffix ) : string
moment this
withoutSuffix bool
return string

FromNow() public static method

public static FromNow ( this moment, bool withoutSuffix, string nullValue ) : string
moment this
withoutSuffix bool
nullValue string
return string

FromNow() public static method

public static FromNow ( this moment, string nullValue ) : string
moment this
nullValue string
return string

Humanize() public static method

public static Humanize ( this duration, bool withSuffix ) : string
duration this
withSuffix bool
return string

ToFullDateTime() public static method

public static ToFullDateTime ( this d ) : string
d this
return string

ToFullDateTime() public static method

public static ToFullDateTime ( this d, string NullValue = "N/A" ) : string
d this
NullValue string
return string

ToISO8601() public static method

public static ToISO8601 ( this d ) : string
d this
return string

ToUnixEpoc() public static method

public static ToUnixEpoc ( this d ) : long
d this
return long

ToUnixEpoc() public static method

public static ToUnixEpoc ( this d ) : long?
d this
return long?