/// <summary> /// Add the end of day time ( 23:59:59 ) to a given date. /// </summary> public static DateTime ToEndOfDayTime(this DateTime dateTime) { return(DateTimeUtility.AddEndTime(dateTime)); }
/// <summary> /// Converts an ISO 8601 Date String ( 2016-04-08T07:00:00.000Z ) to a DateTime object, with an end time of 23:59:59. /// </summary> public static DateTime Iso8601ToDateTimeEnd(this string dateString) { var dateTime = DateTime.Parse(dateString, CultureInfo.InvariantCulture, DateTimeStyles.RoundtripKind); return(DateTimeUtility.AddEndTime(dateTime)); }