Class: TimeScales::Parts::DayOfQuarterClass
Instance Method Summary
collapse
#===, #name, #scale, #subdivision_name, #to_s, #to_time_scales_part
Instance Method Details
#&(time) ⇒ Object
193
194
195
196
197
198
199
|
# 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 ⇒ Object
190
|
# File 'lib/time_scales/parts.rb', line 190
def component_mixin ; Frame::PartComponents::HasDayOfQuarter ; end
|
#default_for_unit? ⇒ Boolean
189
|
# File 'lib/time_scales/parts.rb', line 189
def default_for_unit? ; false ; end
|
#scheme_scoped_precision_mixin ⇒ Object
#scope ⇒ Object
188
|
# File 'lib/time_scales/parts.rb', line 188
def scope ; Units::Quarter ; end
|
#subdivision ⇒ Object
187
|
# File 'lib/time_scales/parts.rb', line 187
def subdivision ; Units::Day ; end
|
#symbol ⇒ Object
186
|
# File 'lib/time_scales/parts.rb', line 186
def symbol ; :day_of_quarter ; end
|