TimeRange parseTimeRange(String input)

Source

TimeRange parseTimeRange(String input) {
  TimeRange tr;
  if (input != null) {
    List<String> l = input.split("/");
    DateTime start = DateTime.parse(l[0]);
    DateTime end = DateTime.parse(l[1]);

    tr = new TimeRange(start, end);
  }
  return tr;
}