functions_table.inc
// Gets the width in % of the main data columns in the day and week views
// given the number of columns, taking into account the row label columns
// and hidden columns
function get_main_column_width($n_columns, $n_hidden=0)
{
  global $row_labels_both_sides, $first_last_width, $column_hidden_width;
  
  // Calculate the percentage width of each of the main columns.   We use number_format
  // because in some locales you would get a comma for the decimal point which
  // would break the CSS
  $column_width = 100 - $first_last_width;
  if (!empty($row_labels_both_sides))
  {
    $column_width = $column_width - $first_last_width;
  }
  // Subtract the hidden columns (unless they are all hidden)
  if ($n_hidden < $n_columns)
  {
    $column_width = $column_width - ($n_hidden * $column_hidden_width);
    $column_width = number_format($column_width/($n_columns - $n_hidden), 6);
  }
  
  return $column_width;
}