Class DateFormatInference

java.lang.Object
app.babylon.table.transform.DateFormatInference

public final class DateFormatInference extends Object
Heuristics for inferring a consistent date format from string columns.
  • Method Details

    • inferFormats

      public static DateFormat[] inferFormats(ColumnObject<String>[] columns)
      Infers one date format per supplied column, optionally using a dominant format to fill ambiguous columns.
      Parameters:
      columns - string columns to inspect
      Returns:
      inferred formats, never null
    • inferFormat

      public static DateFormat inferFormat(ColumnObject<String> column)
      Infers the best date format for one string column.
      Parameters:
      column - string column to inspect
      Returns:
      inferred format or DateFormat.Unknown
    • isLikelyDate

      public static boolean isLikelyDate(CharSequence value)
      Returns whether the value looks like any recognised date.
      Parameters:
      value - text to inspect
      Returns:
      true when the value looks date-like
    • isLikelyDate

      public static boolean isLikelyDate(CharSequence value, boolean isDateName)
      Returns whether the value looks date-like, optionally biasing toward date interpretation when the column name suggests it contains dates.
      Parameters:
      value - text to inspect
      isDateName - whether the surrounding column name suggests date content
      Returns:
      true when the value looks date-like
    • isStrictInteger

      public static boolean isStrictInteger(CharSequence value)
      Returns whether the value is a strict integer literal.
      Parameters:
      value - text to inspect
      Returns:
      true when the value is a strict integer
    • isStrictDecimal

      public static boolean isStrictDecimal(CharSequence value)
      Returns whether the value is a strict decimal literal.
      Parameters:
      value - text to inspect
      Returns:
      true when the value is a strict decimal