/// <summary> /// Serialises a date object to string. /// </summary> /// /// <param name="date">The date object to be serialised.</param> /// /// <returns>The serialised data as a string.</returns> public static string Serialise(DateTime date) { return(DateFormatter.StringFromDate(date)); }
/// <summary> /// Deserialises a date string to a DateTime object. If the string is /// not a valid date string then this will error. /// </summary> /// /// <param name="dateString">The date string..</param> /// /// <returns>The output Date.</returns> public static DateTime DeserialiseDate(string dateString) { return(DateFormatter.DateFromString(dateString)); }