Rock.ExtensionMethods.ToElapsedString C# (CSharp) Method

ToElapsedString() public static method

Returns a friendly elapsed time string.
public static ToElapsedString ( this dateTime, bool condensed = false, bool includeTime = true ) : string
dateTime this The date time.
condensed bool if set to true [condensed].
includeTime bool if set to true [include time].
return string
        public static string ToElapsedString( this DateTime? dateTime, bool condensed = false, bool includeTime = true )
        {
            if ( dateTime.HasValue )
            {
                return ToElapsedString( dateTime.Value, condensed, includeTime );
            }
            else
                return string.Empty;
        }