Class: ZTimeLabelDay
- Inherits:
-
ZTimeLabel
- Object
- ZTimeLabel
- ZTimeLabelDay
- Defined in:
- lib/z_time_label_day.rb
Constant Summary
Constants inherited from ZTimeLabel
Instance Attribute Summary
Attributes inherited from ZTimeLabel
#css_classes, #endtime, #starttime, #title
Class Method Summary collapse
- .end_for_start(t) ⇒ Object
-
.floor(t) ⇒ Object
t is a TimeWithZone or similar.
- .get_timeblocks(id, t1, t2, inc) ⇒ Object
Methods inherited from ZTimeLabel
get_all_blocks, #initialize, offset_from_rid, time_blocks_starting_through, tz_from_rid
Constructor Details
This class inherits a constructor from ZTimeLabel
Class Method Details
.end_for_start(t) ⇒ Object
13 14 15 |
# File 'lib/z_time_label_day.rb', line 13 def self.end_for_start( t ) (t.end_of_day + 1).beginning_of_day # 0.00001 or whatever end |
.floor(t) ⇒ Object
t is a TimeWithZone or similar
18 19 20 |
# File 'lib/z_time_label_day.rb', line 18 def self.floor(t) t.beginning_of_day end |
.get_timeblocks(id, t1, t2, inc) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/z_time_label_day.rb', line 5 def self.get_timeblocks(id, t1, t2, inc) (super).each do |b| b.title = b.starttime.strftime "%a, %b %e" b.css_classes = 'ZTimeHeaderDayRow ' end end |