Class: TimeScales::Parts::QuarterOfYearClass

Inherits:
AbstractPart show all
Includes:
Singleton
Defined in:
lib/time_scales/parts.rb

Instance Method Summary collapse

Methods inherited from AbstractPart

#===, #name, #scale, #subdivision_name, #to_s, #to_time_scales_part

Instance Method Details

#&(time) ⇒ Object



101
102
103
104
# File 'lib/time_scales/parts.rb', line 101

def &(time)
  month_offs = time.month - 1
  ( month_offs / 3 ) + 1
end

#component_mixinObject



98
# File 'lib/time_scales/parts.rb', line 98

def component_mixin ; Frame::PartComponents::HasQuarterOfYear ; end

#default_for_unit?Boolean

Returns:

  • (Boolean)


97
# File 'lib/time_scales/parts.rb', line 97

def default_for_unit? ; true ; end

#scheme_scoped_precision_mixinObject



99
# File 'lib/time_scales/parts.rb', line 99

def scheme_scoped_precision_mixin ; Frame::Precisions::HasQuarterOfSchemePrecision ; end

#scopeObject



96
# File 'lib/time_scales/parts.rb', line 96

def scope       ; Units::Year    ; end

#subdivisionObject



95
# File 'lib/time_scales/parts.rb', line 95

def subdivision ; Units::Quarter ; end

#symbolObject



94
# File 'lib/time_scales/parts.rb', line 94

def symbol ; :quarter_of_year ; end