getDefaultPattern method

String getDefaultPattern(
  1. DateTimeUsing using
)

Gets the default pattern for date, time or date with time.

Implementation

static String getDefaultPattern(DateTimeUsing using) {
  if (using == null || using == DateTimeUsing.dateAndTime) {
    return DateTimeFormat.ISO.toString();
  }
  if (using == DateTimeUsing.dateOnly) {
    return DateTimeFormat.yyyy_dash_MM_dash_dd.toString();
  }
  return DateTimeFormat.HH_colon_mm.toString();
}