ConvertStartDateToUnspecifiedDateTime method

DateTime? ConvertStartDateToUnspecifiedDateTime(
  1. String? value
)
Converts xs:dateTime String with either "Z", "-00:00" bias, or "" suffixes to unspecified StartDate value ignoring the suffix. The String value to parse.

Implementation

DateTime? ConvertStartDateToUnspecifiedDateTime(String? value) {
  // TODO : check unspecified date
  print(".. uses unsafe ConvertStartDateToUnspecifiedDateTime");
  if (StringUtils.IsNullOrEmpty(value)) {
    return null;
  } else {
    return DateTime.parse(value!);
  }
//            if (StringUtils.IsNullOrEmpty(value))
//            {
//                return null;
//            }
//            else
//            {
//                DateTimeOffset dateTimeOffset = DateTimeOffset.Parse(value, CultureInfo.InvariantCulture);
//
//                // Return only the date part with the kind==Unspecified.
//                return dateTimeOffset.Date;
//            }
}