Class: TimestampQueryColumn

Inherits:
QueryColumn show all
Defined in:
app/models/query.rb

Instance Attribute Summary

Attributes inherited from QueryColumn

#default_order, #name, #sortable, #totalable

Instance Method Summary collapse

Methods inherited from QueryColumn

#caption, #css_classes, #frozen?, #initialize, #inline?, #sortable?, #value, #value_object

Methods included from Redmine::I18n

#current_language, #day_letter, #day_name, #find_language, #format_date, #format_hours, #format_time, included, #l, #l_hours, #l_hours_short, #l_or_humanize, #languages_options, #ll, #lu, #month_name, #set_language_if_valid, #valid_languages

Constructor Details

This class inherits a constructor from QueryColumn

Instance Method Details

#group_value(object) ⇒ Object


94
95
96
97
98
# File 'app/models/query.rb', line 94

def group_value(object)
  if time = value(object)
    User.current.time_to_date(time)
  end
end

#groupableObject


88
89
90
91
92
# File 'app/models/query.rb', line 88

def groupable
  if @groupable
    Redmine::Database.timestamp_to_date(sortable, User.current.time_zone)
  end
end