class TimeScales::Parts::DayOfQuarterClass

Public Instance Methods

&(time) click to toggle source
# File lib/time_scales/parts.rb, line 193
def &(time)
  month_offs = time.month - 1
  qtr_offs = month_offs / 3
  qtr_start_mo = ( qtr_offs * 3 ) + 1
  qtr_start_time = Time.new( time.year, qtr_start_mo, 1)
  time.yday - qtr_start_time.yday + 1
end
component_mixin() click to toggle source
# File lib/time_scales/parts.rb, line 190
def component_mixin ; Frame::PartComponents::HasDayOfQuarter ; end
default_for_unit?() click to toggle source
# File lib/time_scales/parts.rb, line 189
def default_for_unit? ; false ; end
scheme_scoped_precision_mixin() click to toggle source
# File lib/time_scales/parts.rb, line 191
def scheme_scoped_precision_mixin ; Frame::Precisions::HasDayOfSchemePrecision ; end
scope() click to toggle source
# File lib/time_scales/parts.rb, line 188
def scope       ; Units::Quarter ; end
subdivision() click to toggle source
# File lib/time_scales/parts.rb, line 187
def subdivision ; Units::Day     ; end
symbol() click to toggle source
# File lib/time_scales/parts.rb, line 186
def symbol ; :day_of_quarter ; end