Rock.Web.UI.Controls.DateRangePicker.FormatDelimitedValues C# (CSharp) Method

FormatDelimitedValues() public static method

Formats the delimited values for display purposes
public static FormatDelimitedValues ( string value ) : string
value string The value.
return string
        public static string FormatDelimitedValues( string value )
        {
            if ( !string.IsNullOrWhiteSpace( value ) && value.Contains( "," ) )
            {
                var dates = value.Split( ',' );
                if ( dates.Length == 2 )
                {
                    return new DateRange( dates[0].AsDateTime(), dates[1].AsDateTime() ).ToString( "d" );
                }
            }

            return null;
        }