/* Determine if String is a valid representation for a time or date. */
BOOLEAN InternalIsTimeLikeString(IN CONST CHAR16 *String, IN CONST CHAR16 Char, IN CONST UINTN Min, IN CONST UINTN Max, IN CONST BOOLEAN MinusOk)
/* Determine if String is a valid representation for a time or date. */
BOOLEAN InternalIsTimeLikeString(IN CONST CHAR16 *String, IN CONST CHAR16 Char, IN CONST UINTN Min, IN CONST UINTN Max, IN CONST BOOLEAN MinusOk)
{
  UINTN  Count;
  Count = 0;
  if (MinusOk) {
    if (*String == L'-') {
      String++;
    }
  }
  if (!ShellIsDecimalDigitCharacter (*String)) {
    return (FALSE);
  }
  for ( ; String != NULL && *String != CHAR_NULL; String++) {
    if (*String == Char) {
      Count++;
      if (Count > Max) {
        return (FALSE);
      }
      continue;
    }
    if (!ShellIsDecimalDigitCharacter (*String)) {
      return (FALSE);
    }
  }
  if (Count < Min) {
    return (FALSE);
  }
  return (TRUE);
}