isUsing method

DateTimeUsing isUsing(
  1. DateTimeFormat format
)

Implementation

static DateTimeUsing isUsing(DateTimeFormat format) {
  if (format == null) {
    return DateTimeUsing.dateAndTime;
  }
  switch (format) {
    case DateTimeFormat.dd_dot_MM_dot_yyyy:
      return DateTimeUsing.dateOnly;
    case DateTimeFormat.HH_colon_mm:
      return DateTimeUsing.timeOnly;
    case DateTimeFormat.ISO:
      return DateTimeUsing.dateOnly;
    case DateTimeFormat.MM_slash_dd_slash_yyyy:
      return DateTimeUsing.dateOnly;
    case DateTimeFormat.yyyy_dash_MM_dash_dd:
      return DateTimeUsing.dateOnly;
  }
  return DateTimeUsing.dateAndTime;
}